From: kwolekr Date: Mon, 9 Dec 2013 03:13:05 +0000 (-0500) Subject: Mapgen Indev: Fix segfault in cave generation due to uninitialized variable X-Git-Tag: 0.4.9~44 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=50b0e9f7a4916044b1938d461c9c4029b30569da;p=oweals%2Fminetest.git Mapgen Indev: Fix segfault in cave generation due to uninitialized variable --- diff --git a/src/mapgen_indev.cpp b/src/mapgen_indev.cpp index 7203fc85d..a22e2522f 100644 --- a/src/mapgen_indev.cpp +++ b/src/mapgen_indev.cpp @@ -274,7 +274,9 @@ void MapgenIndev::generateCaves(int max_stone_y) { CaveIndev::CaveIndev(MapgenIndev *mg, PseudoRandom *ps, PseudoRandom *ps2, v3s16 node_min, bool is_large_cave) { + this->mg = mg; this->vm = mg->vm; + this->ndef = mg->ndef; this->water_level = mg->water_level; this->large_cave = is_large_cave; this->ps = ps;