mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r14410) -Codechange: one can't inject a negative number of parameters, so enforce this by using a uint.
This commit is contained in:
parent
a370f32c15
commit
e635df8d53
@ -191,8 +191,9 @@ void SetDParamStr(uint n, const char *str)
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ char *InlineString(char *buf, StringID string);
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user