From 8059265181d602694e0ad03c6302a62f0199bec2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 15 Aug 2001 06:01:38 +0000 Subject: [PATCH] pr_strings.c: fix some off-by-one bugs gl_mesh.c: make the messing... message developer mode --- libs/gamecode/pr_strings.c | 6 +++--- libs/models/alias/gl_mesh.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/gamecode/pr_strings.c b/libs/gamecode/pr_strings.c index b727c902c..6e36fbd5c 100644 --- a/libs/gamecode/pr_strings.c +++ b/libs/gamecode/pr_strings.c @@ -83,7 +83,7 @@ string_index (progs_t *pr, strref_t *sr) for (i = 0; i < pr->dyn_str_size; i++) { int d = sr - pr->dynamic_strings[i]; if (d >= 0 && d < 1024) - return -(i * 1024 + d); + return ~(i * 1024 + d); } return 0; } @@ -192,8 +192,8 @@ char * PR_GetString (progs_t *pr, int num) { if (num < 0) { - int row = -num / 1024; - num = -num % 1024; + int row = ~num / 1024; + num = ~num % 1024; if (row < 0 || row >= pr->dyn_str_size) return 0; diff --git a/libs/models/alias/gl_mesh.c b/libs/models/alias/gl_mesh.c index b35e6e187..02167d1ec 100644 --- a/libs/models/alias/gl_mesh.c +++ b/libs/models/alias/gl_mesh.c @@ -440,7 +440,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s) } if (remesh) { // build it from scratch - Con_Printf ("meshing %s...\n", m->name); + Con_DPrintf ("meshing %s...\n", m->name); BuildTris (); // trifans or lists