diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index b56a876a8..059826e5e 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -15928,6 +15928,10 @@ void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const if (col)col = Batol(smallbuf); continue; } + + if (stx-fontsize+charxsiz > xdim) + break; + letptr = &fontptr[name[i]<<3]; ptr = (char *)(ylookup[ypos+7]+(stx-fontsize)+frameplace); for (y=7; y>=0; y--) diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index 9f1c39a17..4bc3a67ab 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -1525,6 +1525,12 @@ void OSD_Printf(const char *fmt, ...) Bvsnprintf(tmpstr, 8192, fmt, va); va_end(va); + if (tmpstr[0]==0) + { + mutex_unlock(&m_osdprintf); + return; + } + if (tmpstr[0]=='^' && tmpstr[1]=='1' && tmpstr[2]=='0' && ++OSD_errors > MAX_ERRORS) { if (OSD_errors == MAX_ERRORS + 1)