From 19d65b699c160b5edc5072290c56491fbb8ab7bb Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 13 May 2011 05:48:22 +0000 Subject: [PATCH] Add null ptr check to minitext and fix the quotes for DNCLIP git-svn-id: https://svn.eduke32.com/eduke32@1884 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 36f0e56cd..558c4e8a9 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -465,6 +465,12 @@ int32_t minitext_(int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t cmode = (sb&ROTATESPRITE_MAX)!=0; sb &= ROTATESPRITE_MAX-1; + if (t == NULL) + { + OSD_Printf("minitext: NULL text!\n"); + return 0; + } + do { if (*t == '^' && isdigit(*(t+1))) @@ -6782,7 +6788,7 @@ FOUNDCHEAT: ud.clipping = 1-ud.clipping; KB_FlushKeyBoardQueue(); g_player[myconnectindex].ps->cheat_phase = 0; - P_DoQuote(QUOTE_CHEAT_NOCLIP-ud.clipping, g_player[myconnectindex].ps); + P_DoQuote(QUOTE_CHEAT_NOCLIP-!ud.clipping, g_player[myconnectindex].ps); return; case CHEAT_RESERVED2: