DREAMWEB: crt functions

This commit is contained in:
Bertrand Augereau 2011-11-15 15:57:54 +01:00
parent 11ae1d5940
commit 9c9b7e5a2c

View File

@ -252,9 +252,9 @@ void DreamGenContext::transfertext() {
const char *src = (const char *)segRef(data.word(kFreedesc)).ptr(kFreetext + srcOffset, 0);
char *dst = (char *)segRef(data.word(kExtras)).ptr(kExtext + data.word(kExtextpos), 0);
strcpy(dst, src);
data.word(kExtextpos) += strlen(src) + 1;
size_t len = strlen(src);
memcpy(dst, src, len + 1);
data.word(kExtextpos) += len + 1;
}