fix return value to reflect final string length
This commit is contained in:
parent
4002df3b86
commit
92adb68964
6
test.c
6
test.c
|
@ -53,14 +53,14 @@ int
|
|||
main()
|
||||
{
|
||||
char buf[0x200];
|
||||
int i;
|
||||
int i, l;
|
||||
|
||||
for (i = 0; teststr[i]; i++)
|
||||
{
|
||||
hexdump(teststr[i], 0);
|
||||
|
||||
if (xconv(teststr[i], buf, sizeof(buf)))
|
||||
hexdump(buf, 0);
|
||||
if ((l = xconv(teststr[i], buf, sizeof(buf))))
|
||||
hexdump(buf, l);
|
||||
else
|
||||
printf("Unchanged.\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue