Advertisement
Guest User

Untitled

a guest
Sep 26th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.51 KB | None | 0 0
  1. diff -ru eduke32-oldmp_orig/build/include/compat.h eduke32-oldmp_/build/include/compat.h
  2. --- eduke32-oldmp_orig/build/include/compat.h   2013-09-06 14:09:28.623210032 +0900
  3. +++ eduke32-oldmp_/build/include/compat.h   2013-09-06 09:40:20.953046303 +0900
  4. @@ -471,6 +471,14 @@
  5.  char *Bstrtoken(char *s, char *delim, char **ptrptr, int chop);
  6.  int Bwildmatch (const char *i, const char *j);
  7.  
  8. +// Copy min(strlen(src)+1, n) characters into dst, always terminate with a NUL.
  9. +static inline char *Bstrncpyz(char *dst, const char *src, bsize_t n)
  10. +{
  11. +    Bstrncpy(dst, src, n);
  12. +    dst[n-1] = 0;
  13. +    return dst;
  14. +}
  15. +
  16.  #if !defined(_WIN32)
  17.  char *Bstrlwr(char *);
  18.  char *Bstrupr(char *);
  19. diff -ru eduke32-oldmp_orig/build/src/osd.c eduke32-oldmp_/build/src/osd.c
  20. --- eduke32-oldmp_orig/build/src/osd.c  2012-09-09 01:48:49.000000000 +0900
  21. +++ eduke32-oldmp_/build/src/osd.c  2013-09-06 14:41:37.942034292 +0900
  22. @@ -35,7 +35,7 @@
  23.  // history display
  24.  static char osdtext[TEXTSIZE];
  25.  static char osdfmt[TEXTSIZE];
  26. -static char osdversionstring[32];
  27. +static char osdversionstring[64];
  28.  static int  osdversionstringlen;
  29.  static int  osdversionstringshade;
  30.  static int  osdversionstringpal;
  31. @@ -1776,7 +1776,7 @@
  32.  {
  33.  //    if (!osdinited) OSD_Init();
  34.  
  35. -    Bstrcpy(osdversionstring,version);
  36. +    Bstrncpyz(osdversionstring, version, 32);
  37.      osdversionstringlen = Bstrlen(osdversionstring);
  38.      osdversionstringshade = shade;
  39.      osdversionstringpal = pal;
  40. diff -ru eduke32-oldmp_orig/Makefile eduke32-oldmp_/Makefile
  41. --- eduke32-oldmp_orig/Makefile 2013-09-06 14:09:31.487235966 +0900
  42. +++ eduke32-oldmp_/Makefile 2013-09-06 09:43:54.706319384 +0900
  43. @@ -17,7 +17,7 @@
  44.  JAUDIOLIBDIR=$(SRC)/jaudiolib
  45.  JAUDIOLIB=libjfaudiolib.a
  46.  
  47. -LIBS=-lm
  48. +LIBS=-lm -ldl
  49.  
  50.  include $(EROOT)/Makefile.shared
  51.  
  52. diff -ru eduke32-oldmp_orig/Makefile.common eduke32-oldmp_/Makefile.common
  53. --- eduke32-oldmp_orig/Makefile.common  2012-12-07 11:26:15.000000000 +0900
  54. +++ eduke32-oldmp_/Makefile.common  2013-09-06 14:09:01.399963734 +0900
  55. @@ -173,6 +173,7 @@
  56.  endif
  57.  
  58.  BASECFLAGS=$(debug) $(OPTOPT) -W -Wall -funsigned-char -fno-strict-aliasing \
  59. +       -Wno-attributes -Wno-unused-result -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-unused-parameter \
  60.         -Werror-implicit-function-declaration -DNO_GCC_BUILTINS -DNOCOPYPROTECT -D_FORTIFY_SOURCE=2
  61.  
  62.  BASELDFLAGS+= $(OPTOPT)
  63. diff -ru eduke32-oldmp_orig/source/game.c eduke32-oldmp_/source/game.c
  64. --- eduke32-oldmp_orig/source/game.c    2012-09-13 16:16:49.000000000 +0900
  65. +++ eduke32-oldmp_/source/game.c    2013-09-06 18:08:03.802826282 +0900
  66. @@ -886,12 +886,12 @@
  67.  
  68.                  if (packbuf[2] != (char)atoi(s_buildDate))
  69.                  {
  70. -                    initprintf("Player %d has version %d, expecting %d\n",packbuf[2],(char)atoi(s_buildDate));
  71. +                    initprintf("Player has version %d, expecting %d\n",packbuf[2],(char)atoi(s_buildDate));
  72.                      G_GameExit("You cannot play with different versions of EDuke32!");
  73.                  }
  74. -                if (packbuf[3] != BYTEVERSION)
  75. +                if (packbuf[3] != (char)BYTEVERSION)
  76.                  {
  77. -                    initprintf("Player %d has version %d, expecting %d\n",packbuf[3],BYTEVERSION);
  78. +                    initprintf("Player has version %d, expecting %d (%d, %d, %d)\n",packbuf[3],BYTEVERSION, BYTEVERSION_JF, PLUTOPAK, VOLUMEONE);
  79.                      G_GameExit("You cannot play Duke with different versions!");
  80.                  }
  81.                  if (packbuf[4] > g_numSyncBytes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement