couple fixes
[carveJwlIkooP6JGAAIwe30JlM.git] / world_sfd.h
index 5b5bd9973e5bb907860fb77e9518b8d5b9d406ff..3f94c4ed86fae271a5948d20c521179ccf395c65 100644 (file)
@@ -60,16 +60,18 @@ VG_STATIC void sfd_encode( u32 row, const char *str )
 
    for( int i=0; i<world.sfd.w; i++ )
    {
+      u32 idx = (world.sfd.w*row_h + i) * 2;
+
       if( end )
       {
-         world.sfd.buffer[world.sfd.w*row_h + i] = 0.0f;
+         world.sfd.buffer[idx] = 0.0f;
       }
       else
       {
          if( !str[i] )
             end = 1;
 
-         world.sfd.buffer[world.sfd.w*row_h + i] = sfd_encode_glyph( str[i] );
+         world.sfd.buffer[idx] = sfd_encode_glyph( str[i] );
       }
    }
 }