mirror of https://github.com/dahall/Vanara.git
Fixed Unicode bug in GetString
parent
178701d505
commit
3c40989527
|
@ -173,7 +173,7 @@ namespace Vanara.Extensions
|
|||
}
|
||||
else
|
||||
{
|
||||
for (var uptr = (ushort*)ptr; chkLen < allocatedBytes && *uptr != 0; chkLen += 2, uptr++)
|
||||
for (var uptr = (ushort*)ptr; chkLen + 2 <= allocatedBytes && *uptr != 0; chkLen += 2, uptr++)
|
||||
sb.Append((char)*uptr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue