Mercurial > sdl-ios-xcode
comparison src/stdlib/SDL_string.c @ 5076:8bf5781fc582
Fixed size_t warnings on 64-bit build
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 22 Jan 2011 15:58:21 -0800 |
parents | e2f4e31b41fc |
children | b530ef003506 |
comparison
equal
deleted
inserted
replaced
5074:906d7293bb47 | 5076:8bf5781fc582 |
---|---|
406 | 406 |
407 size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes) | 407 size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes) |
408 { | 408 { |
409 size_t src_bytes = SDL_strlen(src); | 409 size_t src_bytes = SDL_strlen(src); |
410 size_t bytes = SDL_min(src_bytes, dst_bytes - 1); | 410 size_t bytes = SDL_min(src_bytes, dst_bytes - 1); |
411 int i = 0; | 411 size_t i = 0; |
412 char trailing_bytes = 0; | 412 char trailing_bytes = 0; |
413 if (bytes) | 413 if (bytes) |
414 { | 414 { |
415 unsigned char c = (unsigned char)src[bytes - 1]; | 415 unsigned char c = (unsigned char)src[bytes - 1]; |
416 if (UTF8_IsLeadByte(c)) | 416 if (UTF8_IsLeadByte(c)) |