summaryrefslogtreecommitdiff
path: root/strings.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-15 10:31:48 +0000
committertron <tron@openttd.org>2004-11-15 10:31:48 +0000
commit57c472e093aad072d5c4113790dfafbca0f40fa6 (patch)
tree33cba4e194270ded85bd9c544bbf733f90eda205 /strings.c
parent01e88bb61d00c96991d9280cea6bc188cc42db33 (diff)
downloadopenttd-57c472e093aad072d5c4113790dfafbca0f40fa6.tar.xz
(svn r624) Merge r377 to trunk:
Remove the memmove special case for MSVC According to the MSDN it was just plain wrong and memmove was directly used in some places anyway
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/strings.c b/strings.c
index 567ec6792..f1c44486b 100644
--- a/strings.c
+++ b/strings.c
@@ -182,14 +182,14 @@ void InjectDparam(int amount)
int32 GetParamInt32()
{
int32 result = GET_DPARAM32(0);
- memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
+ memmove(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
return result;
}
static int64 GetParamInt64()
{
int64 result = GET_DPARAM32(0) + ((uint64)GET_DPARAM32(1) << 32);
- memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[2], sizeof(uint32) * (lengthof(_decode_parameters)-2));
+ memmove(&_decode_parameters[0], &_decode_parameters[2], sizeof(uint32) * (lengthof(_decode_parameters)-2));
return result;
}
@@ -197,21 +197,21 @@ static int64 GetParamInt64()
int GetParamInt16()
{
int result = (int16)GET_DPARAM16(0);
- memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
+ memmove(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
return result;
}
int GetParamInt8()
{
int result = (int8)GET_DPARAM8(0);
- memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
+ memmove(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
return result;
}
int GetParamUint16()
{
int result = GET_DPARAM16(0);
- memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
+ memmove(&_decode_parameters[0], &_decode_parameters[1], sizeof(uint32) * (lengthof(_decode_parameters)-1));
return result;
}