projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cb445f
)
fixed bug causing access to negative array index
author
Holger Schemel
<info@artsoft.org>
Sun, 17 Feb 2019 23:12:14 +0000
(
00:12
+0100)
committer
Holger Schemel
<info@artsoft.org>
Sun, 17 Feb 2019 23:12:14 +0000
(
00:12
+0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 3fa42f10eab74c5accddb47ecc8d90872e340f06..093b229083d6f4e3539ebfd28ccd0559718e21c2 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-10876,7
+10876,6
@@
static void SetElementIntelliDraw(int x, int y, int new_element,
};
static int last_x = -1;
static int last_y = -1;
- int old_element = IntelliDrawBuffer[x][y];
if (new_element == EL_UNDEFINED)
{
@@
-10886,6
+10885,8
@@
static void SetElementIntelliDraw(int x, int y, int new_element,
return;
}
+ int old_element = IntelliDrawBuffer[x][y];
+
if (IS_TUBE(new_element))
{
int last_element_new = EL_UNDEFINED;