- fixed a serious bug where %T arguments were read backwards (they now match the wiki documentation of phrase and then client)
authorDavid Anderson <dvander@alliedmods.net>
Wed Jun 06 17:34:35 2007 +0000 (2007-06-06)
changeset 888b3c080b0e9bb
parent 887 7a38baa4d85c
child 889 176ae94f3747
- fixed a serious bug where %T arguments were read backwards (they now match the wiki documentation of phrase and then client)
- fixed a bug where the argument count for %T was not checked properly
core/sm_stringutil.cpp
     1.1 --- a/core/sm_stringutil.cpp	Wed Jun 06 17:34:16 2007 +0000
     1.2 +++ b/core/sm_stringutil.cpp	Wed Jun 06 17:34:35 2007 +0000
     1.3 @@ -738,13 +738,13 @@
     1.4  			}
     1.5  		case 'T':
     1.6  			{
     1.7 -				CHECK_ARGS(0);
     1.8 +				CHECK_ARGS(1);
     1.9  				char *key;
    1.10  				bool error;
    1.11  				size_t res;
    1.12  				cell_t *target;
    1.13 +				pCtx->LocalToString(params[arg++], &key);
    1.14  				pCtx->LocalToPhysAddr(params[arg++], &target);
    1.15 -				pCtx->LocalToString(params[arg++], &key);
    1.16  				res = Translate(buf_p, llen, pCtx, key, *target, params, &arg, &error);
    1.17  				if (error)
    1.18  				{