forked from enlightenment/efl
ecore_imf: Account for terminating null byte on copy
strlen retruns the count with the terminating null byte but strncpy expects length with it. Account for that.
This commit is contained in:
parent
6924e3010c
commit
2389d7f8ee
|
@ -373,7 +373,7 @@ feed_key_event(Evas *evas, const char *str, Eina_Bool fake)
|
|||
else
|
||||
{
|
||||
if (strlen(str) + 1 > 128) return;
|
||||
strncpy(key_string, str, strlen(str));
|
||||
strncpy(key_string, str, strlen(str) + 1);
|
||||
evas_event_feed_key_down(evas, key_string, key_string, NULL, NULL, timestamp, NULL);
|
||||
SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_down()...\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue