Bug 68990 - test-common fails on i686-linux
Fix use-after-end-of-scope.
This commit is contained in:
parent
b61f97d544
commit
48360ec03b
|
@ -292,11 +292,13 @@ retry:
|
||||||
hb_language_t
|
hb_language_t
|
||||||
hb_language_from_string (const char *str, int len)
|
hb_language_from_string (const char *str, int len)
|
||||||
{
|
{
|
||||||
|
char strbuf[64];
|
||||||
|
|
||||||
if (!str || !len || !*str)
|
if (!str || !len || !*str)
|
||||||
return HB_LANGUAGE_INVALID;
|
return HB_LANGUAGE_INVALID;
|
||||||
|
|
||||||
if (len >= 0) {
|
if (len >= 0)
|
||||||
char strbuf[64];
|
{
|
||||||
len = MIN (len, (int) sizeof (strbuf) - 1);
|
len = MIN (len, (int) sizeof (strbuf) - 1);
|
||||||
str = (char *) memcpy (strbuf, str, len);
|
str = (char *) memcpy (strbuf, str, len);
|
||||||
strbuf[len] = '\0';
|
strbuf[len] = '\0';
|
||||||
|
|
Loading…
Reference in New Issue