Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ru eduke32-oldmp_orig/build/include/compat.h eduke32-oldmp_/build/include/compat.h
- --- eduke32-oldmp_orig/build/include/compat.h 2013-09-06 14:09:28.623210032 +0900
- +++ eduke32-oldmp_/build/include/compat.h 2013-09-06 09:40:20.953046303 +0900
- @@ -471,6 +471,14 @@
- char *Bstrtoken(char *s, char *delim, char **ptrptr, int chop);
- int Bwildmatch (const char *i, const char *j);
- +// Copy min(strlen(src)+1, n) characters into dst, always terminate with a NUL.
- +static inline char *Bstrncpyz(char *dst, const char *src, bsize_t n)
- +{
- + Bstrncpy(dst, src, n);
- + dst[n-1] = 0;
- + return dst;
- +}
- +
- #if !defined(_WIN32)
- char *Bstrlwr(char *);
- char *Bstrupr(char *);
- diff -ru eduke32-oldmp_orig/build/src/osd.c eduke32-oldmp_/build/src/osd.c
- --- eduke32-oldmp_orig/build/src/osd.c 2012-09-09 01:48:49.000000000 +0900
- +++ eduke32-oldmp_/build/src/osd.c 2013-09-06 14:41:37.942034292 +0900
- @@ -35,7 +35,7 @@
- // history display
- static char osdtext[TEXTSIZE];
- static char osdfmt[TEXTSIZE];
- -static char osdversionstring[32];
- +static char osdversionstring[64];
- static int osdversionstringlen;
- static int osdversionstringshade;
- static int osdversionstringpal;
- @@ -1776,7 +1776,7 @@
- {
- // if (!osdinited) OSD_Init();
- - Bstrcpy(osdversionstring,version);
- + Bstrncpyz(osdversionstring, version, 32);
- osdversionstringlen = Bstrlen(osdversionstring);
- osdversionstringshade = shade;
- osdversionstringpal = pal;
- diff -ru eduke32-oldmp_orig/Makefile eduke32-oldmp_/Makefile
- --- eduke32-oldmp_orig/Makefile 2013-09-06 14:09:31.487235966 +0900
- +++ eduke32-oldmp_/Makefile 2013-09-06 09:43:54.706319384 +0900
- @@ -17,7 +17,7 @@
- JAUDIOLIBDIR=$(SRC)/jaudiolib
- JAUDIOLIB=libjfaudiolib.a
- -LIBS=-lm
- +LIBS=-lm -ldl
- include $(EROOT)/Makefile.shared
- diff -ru eduke32-oldmp_orig/Makefile.common eduke32-oldmp_/Makefile.common
- --- eduke32-oldmp_orig/Makefile.common 2012-12-07 11:26:15.000000000 +0900
- +++ eduke32-oldmp_/Makefile.common 2013-09-06 14:09:01.399963734 +0900
- @@ -173,6 +173,7 @@
- endif
- BASECFLAGS=$(debug) $(OPTOPT) -W -Wall -funsigned-char -fno-strict-aliasing \
- + -Wno-attributes -Wno-unused-result -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-unused-parameter \
- -Werror-implicit-function-declaration -DNO_GCC_BUILTINS -DNOCOPYPROTECT -D_FORTIFY_SOURCE=2
- BASELDFLAGS+= $(OPTOPT)
- diff -ru eduke32-oldmp_orig/source/game.c eduke32-oldmp_/source/game.c
- --- eduke32-oldmp_orig/source/game.c 2012-09-13 16:16:49.000000000 +0900
- +++ eduke32-oldmp_/source/game.c 2013-09-06 18:08:03.802826282 +0900
- @@ -886,12 +886,12 @@
- if (packbuf[2] != (char)atoi(s_buildDate))
- {
- - initprintf("Player %d has version %d, expecting %d\n",packbuf[2],(char)atoi(s_buildDate));
- + initprintf("Player has version %d, expecting %d\n",packbuf[2],(char)atoi(s_buildDate));
- G_GameExit("You cannot play with different versions of EDuke32!");
- }
- - if (packbuf[3] != BYTEVERSION)
- + if (packbuf[3] != (char)BYTEVERSION)
- {
- - initprintf("Player %d has version %d, expecting %d\n",packbuf[3],BYTEVERSION);
- + initprintf("Player has version %d, expecting %d (%d, %d, %d)\n",packbuf[3],BYTEVERSION, BYTEVERSION_JF, PLUTOPAK, VOLUMEONE);
- G_GameExit("You cannot play Duke with different versions!");
- }
- if (packbuf[4] > g_numSyncBytes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement