Fix some "Conditional jump or move depends on uninitialised value(s)" valgrind detections
authorPerttu Ahola <celeron55@gmail.com>
Sat, 15 Oct 2011 20:07:43 +0000 (23:07 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 15 Oct 2011 20:07:43 +0000 (23:07 +0300)
src/mapblock_mesh.cpp
src/player.cpp

index 7515664ea8277b1a1488b4dd8b4f2030df3bb3ae..2bee572f04169c43221a22b3237d7fd60d17f10c 100644 (file)
@@ -492,10 +492,10 @@ void updateFastFaceRow(
        
        u16 continuous_tiles_count = 0;
        
-       bool makes_face;
+       bool makes_face = false;
        v3s16 p_corrected;
        v3s16 face_dir_corrected;
-       u8 lights[4];
+       u8 lights[4] = {0,0,0,0};
        TileSpec tile;
        getTileInfo(blockpos_nodes, p, face_dir, daynight_ratio,
                        vmanip, temp_mods, smooth_lighting,
index 86f0be7a172c2bf534fd3d620c5c736f2b632ff2..6a774251cc110289edc22137c4a976b1760080f0 100644 (file)
@@ -31,7 +31,9 @@ Player::Player():
        touching_ground(false),
        in_water(false),
        in_water_stable(false),
+       is_climbing(false),
        swimming_up(false),
+       is_frozen(false),
        inventory_backup(NULL),
        craftresult_is_preview(true),
        hp(20),