commit | dac86026a6bae5a8a03cfe885bf93f32e5f48614 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <[email protected]> | Tue Jun 03 17:57:00 2014 -0400 |
committer | Behdad Esfahbod <[email protected]> | Tue Jun 03 17:57:00 2014 -0400 |
tree | 6cf3cd6962792f22889a70eb03bbb2e3adb742d0 | |
parent | c306410cab368a27c1941a2625d3b475edeaac04 [diff] [blame] |
Fix some cppcheck warnings Bug 77800 - cppcheck reports
diff --git a/src/hb-common.cc b/src/hb-common.cc index 96725c4..afaecce 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc
@@ -299,9 +299,11 @@ if (len >= 0) { + /* NUL-terminate it. */ len = MIN (len, (int) sizeof (strbuf) - 1); - str = (char *) memcpy (strbuf, str, len); + memcpy (strbuf, str, len); strbuf[len] = '\0'; + str = strbuf; } hb_language_item_t *item = lang_find_or_insert (str);