diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index 523ac608f..c1d254dff 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -219,7 +219,7 @@ const char *OSD_StripColors(char *out, const char *in) { const char *ptr = out; - do + while (*in) { if (*in == '^' && isdigit(*(in+1))) { @@ -240,10 +240,9 @@ const char *OSD_StripColors(char *out, const char *in) } *(out++) = *(in++); } - while (*in); *out = '\0'; - return (ptr); + return ptr; } int32_t OSD_Exec(const char *szScript) diff --git a/polymer/eduke32/source/global.h b/polymer/eduke32/source/global.h index 8605e009d..c2f4a912a 100644 --- a/polymer/eduke32/source/global.h +++ b/polymer/eduke32/source/global.h @@ -67,6 +67,7 @@ G_EXTERN char myjumpingtoggle,myonground,myhardlanding,myreturntocenter; G_EXTERN char pus,pub; G_EXTERN char ready2send; G_EXTERN char szPlayerName[32]; +// XXX: menutextbuf overflow possible? G_EXTERN char tempbuf[MAXSECTORS<<1],packbuf[PACKBUF_SIZE],menutextbuf[128],buf[1024]; G_EXTERN char typebuflen,typebuf[141]; G_EXTERN input_t avg;