mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
Fix off-by-one error resulting in truncated output from wcsndup fallback and halloc_wcsndup
darcs-hash:20060221144642-ac50b-9dcd77238bc4bd740bbda6e15ded793fad44c363.gz
This commit is contained in:
@@ -88,7 +88,7 @@ wchar_t *halloc_wcsndup( void * context, const wchar_t *in, int c )
|
||||
{
|
||||
die_mem();
|
||||
}
|
||||
wcslcpy( res, in, c );
|
||||
wcslcpy( res, in, c+1 );
|
||||
res[c] = L'\0';
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user