1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-26 04:53:18 +02:00

qi-fix-strncpy.patch

Mini strncpy patch was buggy.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:38 +00:00 committed by Andy Green
parent 2e2480ff21
commit 5dbdcda9b2

View File

@ -59,6 +59,9 @@ char *strncpy(char *dest, const char *src, size_t n)
while (*src && n--) while (*src && n--)
*dest++ = *src++; *dest++ = *src++;
if (n)
*dest = '\0';
return dest_orig; return dest_orig;
} }