summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-06-05 16:06:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-08 11:47:19 (GMT)
commite182e7422cc5670dc9217ac12bba7ba12542678d (patch)
tree9d0b3352e9f86630ac1f89c349d3292c27a1f254 /src/interface.c
parent43a4544a13e54f3ffb89a06466b6a77afd2e6ff3 (diff)
downloadpowder-e182e7422cc5670dc9217ac12bba7ba12542678d.zip
powder-e182e7422cc5670dc9217ac12bba7ba12542678d.tar.gz
Loads of error messages for lua, and hopefully fix lua stack overflow
Also fix game exiting when an error occurs in a step function. Returning -1 seems to prevent lua from restoring the stack to the state it was in before the C function call - see bottom of luaD_precall() in lua source (ldo.c)
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index bff2182..b6d854e 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2344,7 +2344,7 @@ corrupt:
int search_ui(pixel *vid_buf)
{
- int nmp,uih=0,nyu,nyd,b=1,bq,mx=0,my=0,mxq=0,myq=0,mmt=0,gi,gj,gx,gy,pos,i,mp,dp,dap,own,last_own=search_own,last_fav=search_fav,page_count=0,last_page=0,last_date=0,j,w,h,st=0,lv;
+ int nmp=-1,uih=0,nyu,nyd,b=1,bq,mx=0,my=0,mxq=0,myq=0,mmt=0,gi,gj,gx,gy,pos,i,mp,dp,dap,own,last_own=search_own,last_fav=search_fav,page_count=0,last_page=0,last_date=0,j,w,h,st=0,lv;
int is_p1=0, exp_res=GRID_X*GRID_Y, tp, view_own=0;
int thumb_drawn[GRID_X*GRID_Y];
pixel *v_buf = (pixel *)malloc(((YRES+MENUSIZE)*(XRES+BARSIZE))*PIXELSIZE);