mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 18:37:31 +02:00
qi-fix-strncpy.patch
Mini strncpy patch was buggy. Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
parent
2e2480ff21
commit
5dbdcda9b2
@ -59,6 +59,9 @@ char *strncpy(char *dest, const char *src, size_t n)
|
||||
while (*src && n--)
|
||||
*dest++ = *src++;
|
||||
|
||||
if (n)
|
||||
*dest = '\0';
|
||||
|
||||
return dest_orig;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user