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:
parent
2e2480ff21
commit
5dbdcda9b2
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user