Merge pull request #590 from mthorpe7/fix_upstream_crash
Fix NULL pointer issue with Word2000 empty attributes.
This commit is contained in:
commit
1f3cf24e82
|
@ -126,6 +126,13 @@ int TY_(tmbstrcasecmp)( ctmbstr s1, ctmbstr s2 )
|
||||||
|
|
||||||
int TY_(tmbstrncmp)( ctmbstr s1, ctmbstr s2, uint n )
|
int TY_(tmbstrncmp)( ctmbstr s1, ctmbstr s2, uint n )
|
||||||
{
|
{
|
||||||
|
if (s1 == NULL || s2 == NULL)
|
||||||
|
{
|
||||||
|
if (s1 == s2)
|
||||||
|
return 0;
|
||||||
|
return (s1 == NULL ? -1 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
uint c;
|
uint c;
|
||||||
|
|
||||||
while ((c = (byte)*s1) == (byte)*s2)
|
while ((c = (byte)*s1) == (byte)*s2)
|
||||||
|
|
Loading…
Reference in a new issue