From 825953bbdccb4d5e10ee8e932ca2025e5eb7e0a9 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 15 Oct 2011 23:07:43 +0300 Subject: [PATCH] Fix some "Conditional jump or move depends on uninitialised value(s)" valgrind detections --- src/mapblock_mesh.cpp | 4 ++-- src/player.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index 7515664ea..2bee572f0 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -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, diff --git a/src/player.cpp b/src/player.cpp index 86f0be7a1..6a774251c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -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), -- 2.25.1