aboutsummaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/makefile2
-rw-r--r--extensions/smgrid.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/extensions/makefile b/extensions/makefile
index 4c6b3fe..c5f30e1 100644
--- a/extensions/makefile
+++ b/extensions/makefile
@@ -1,5 +1,5 @@
CC= g++
-CXXFLAGS= -c -std=c++11 -Wall -I../include -I/usr/include/freetype2
+CXXFLAGS= -c -g -std=c++11 -Wall -I../include -I/usr/include/freetype2 -fPIC
all: objects archive clean
diff --git a/extensions/smgrid.cpp b/extensions/smgrid.cpp
index d78864f..5e00a6b 100644
--- a/extensions/smgrid.cpp
+++ b/extensions/smgrid.cpp
@@ -70,7 +70,7 @@ void smGrid::setBlend(int blend){quad.blend=blend;}
void smGrid::setColor(int c,int r,DWORD col){if(c<cc&&r<rc)pos[r*cc+c].col=col;}
void smGrid::setPos(int c,int r,float x,float y,float z,int ref)
{
- if(c<cc&&r<rc)
+ if(c>=0&&r>=0&&c<cc&&r<rc)
{
if(ref==GRID_REFCENTER)x+=cw*(cc-1)/2,y+=ch*(rc-1)/2;
if(ref==GRID_REFNODE)x+=c*cw,y+=r*ch;