From 132a5ad9d4df5e6f766783d769483839c4d9e7d8 Mon Sep 17 00:00:00 2001 From: Timur Malin Date: Tue, 20 Jan 2015 18:05:10 +0300 Subject: [PATCH] Bug fix Use of uninitialised variable causes segfault in line 1255: dir[0]=wd[i].curPos[0]-wd[lastbreak].curPos[0]; --- gdecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdecoder.cpp b/gdecoder.cpp index 3e18b9c..d26cafb 100644 --- a/gdecoder.cpp +++ b/gdecoder.cpp @@ -1241,7 +1241,7 @@ void GDecoder::knive(float knivedelay) bool moveAbsolute=true; float units=1; float dir[2]={0,0}; - int lastbreak,lastxmove=0,lastymove=0; + int lastbreak=0,lastxmove=0,lastymove=0; for(int i=0;i