mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
SCI: reverting r50232, didnt make sense. thx @ wjp for noticing
svn-id: r50233
This commit is contained in:
parent
893429d092
commit
35b5da7e0f
@ -649,15 +649,14 @@ void SegManager::strncpy(reg_t dest, const char* src, size_t n) {
|
||||
::strncpy((char *)dest_r.raw, src, n);
|
||||
} else {
|
||||
// raw -> non-raw
|
||||
uint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
for (uint i = 0; i < n; i++) {
|
||||
setChar(dest_r, i, src[i]);
|
||||
if (!src[i])
|
||||
break;
|
||||
}
|
||||
// Put an ending NUL to terminate the string
|
||||
if ((size_t)dest_r.maxSize > i)
|
||||
setChar(dest_r, i, 0);
|
||||
if ((size_t)dest_r.maxSize > n)
|
||||
setChar(dest_r, n, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user