mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-11 11:53:29 +00:00
seems to work
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@243 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -75,14 +75,17 @@ int MwUTF8Length(const char* input) {
|
||||
return len;
|
||||
}
|
||||
|
||||
int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len){
|
||||
int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len) {
|
||||
int i;
|
||||
int out;
|
||||
int total = 0;
|
||||
for(i = 0; i < srcskip; i++) src += MwUTF8ToUTF32(src, &out);
|
||||
for(i = 0; i < dstskip; i++) dst += MwUTF8ToUTF32(dst, &out);
|
||||
for(i = 0; i < len; i++){
|
||||
int len = MwUTF8ToUTF32(src, &out);
|
||||
for(i = 0; i < len; i++) {
|
||||
int len;
|
||||
if(src[0] == 0) break;
|
||||
|
||||
len = MwUTF8ToUTF32(src, &out);
|
||||
|
||||
memcpy(dst, src, len);
|
||||
|
||||
@@ -90,7 +93,7 @@ int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len){
|
||||
dst += len;
|
||||
total += len;
|
||||
}
|
||||
dst[total] = 0;
|
||||
dst[0] = 0;
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user