You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ap...@apache.org on 2007/04/26 13:19:24 UTC

svn commit: r532705 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp

Author: apetrenko
Date: Thu Apr 26 04:19:23 2007
New Revision: 532705

URL: http://svn.apache.org/viewvc?view=rev&rev=532705
Log:
Patch for HARMONY-3677 "[classlib][awt] Results of running checker tool"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp?view=diff&rev=532705&r1=532704&r2=532705
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/LUTTables.cpp Thu Apr 26 04:19:23 2007
@@ -21,6 +21,7 @@
  */
  
 #include "LUTTables.h"
+#include <string.h>
 
 unsigned char mulLUT[256][256];  /* Multiply Luckup table */
 unsigned char divLUT[256][256];  /* Divide Luckup table   */
@@ -41,7 +42,8 @@
 void init_divLUT(){
     int i, j;
     if(divLUT_inited) return;
-    for(i = 0; i < 256; i++){
+    memset(divLUT[0], 0, 256);
+    for(i = 1; i < 256; i++){
         for(j = 0; j <= i; j++){
             divLUT[i][j] = (int)(((float)j) / i * 255 + 0.5);
         }