| 651 | } |
| 652 | |
| 653 | int String_EncodeUtf8(void* data, const cc_string* src) { |
| 654 | cc_uint8* dst = (cc_uint8*)data; |
| 655 | cc_uint8* cur; |
| 656 | int i, len = 0; |
| 657 | if (src->length > FILENAME_SIZE) Process_Abort("String too long to expand"); |
| 658 | |
| 659 | for (i = 0; i < src->length; i++) { |
| 660 | cur = dst + len; |
| 661 | len += Convert_CP437ToUtf8(src->buffer[i], cur); |
| 662 | } |
| 663 | dst[len] = '\0'; |
| 664 | return len; |
| 665 | } |
| 666 | |
| 667 | |
| 668 | /*########################################################################################################################* |
no test coverage detected