Changeset 3047
- Timestamp:
- Jan 6, 2010 2:35:13 PM (15 years ago)
- Location:
- pjproject/trunk/pjlib/src/pj
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/unicode_symbian.cpp
r2394 r3047 39 39 *wbuf = 0; 40 40 } else { 41 wbuf[len] = 0; 41 if (len < wbuf_count) 42 wbuf[len] = 0; 43 else 44 wbuf[len-1] = 0; 42 45 } 43 46 … … 62 65 buf[0] = '\0'; 63 66 } else { 64 buf[len] = '\0'; 67 if (len < buf_size) 68 buf[len] = '\0'; 69 else 70 buf[len-1] = '\0'; 65 71 } 66 72 -
pjproject/trunk/pjlib/src/pj/unicode_win32.c
r2394 r3047 31 31 len = MultiByteToWideChar(CP_ACP, 0, s, len, 32 32 buf, buf_count); 33 buf[len] = 0; 33 if (buf_count) { 34 if (len < buf_count) 35 buf[len] = 0; 36 else 37 buf[len-1] = 0; 38 } 39 34 40 return buf; 35 41 } … … 42 48 43 49 len = WideCharToMultiByte(CP_ACP, 0, wstr, len, buf, buf_size, NULL, NULL); 44 buf[len] = '\0'; 50 if (buf_size) { 51 if (len < buf_size) 52 buf[len] = '\0'; 53 else 54 buf[len-1] = '\0'; 55 } 56 45 57 return buf; 46 58 }
Note: See TracChangeset
for help on using the changeset viewer.