Changeset - r10197:a65cfa37d4ad
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2008-09-28 13:50:11
rubidium@openttd.org
(svn r14410) -Codechange: one can't inject a negative number of parameters, so enforce this by using a uint.
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -191,8 +191,9 @@ void SetDParamStr(uint n, const char *st
 
	SetDParam(n, (uint64)(size_t)str);
 
}
 

	
 
void InjectDParam(int amount)
 
void InjectDParam(uint amount)
 
{
 
	assert((uint)amount < lengthof(_decode_parameters));
 
	memmove(_decode_parameters + amount, _decode_parameters, sizeof(_decode_parameters) - amount * sizeof(uint64));
 
}
 

	
src/strings_func.h
Show inline comments
 
@@ -11,7 +11,7 @@ char *InlineString(char *buf, StringID s
 
char *GetString(char *buffr, StringID string, const char *last);
 
const char *GetStringPtr(StringID string);
 

	
 
void InjectDParam(int amount);
 
void InjectDParam(uint amount);
 

	
 
static inline void SetDParamX(uint64 *s, uint n, uint64 v)
 
{
0 comments (0 inline, 0 general)