X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/637dcc82c8595130b3627c526126946b43c0707a..cddc537f3359281db6c16b6b059ca20a20f970c5:/badge/jumpnrun/starter.c?ds=sidebyside diff --git a/badge/jumpnrun/starter.c b/badge/jumpnrun/starter.c index 0645487..d35c5fa 100644 --- a/badge/jumpnrun/starter.c +++ b/badge/jumpnrun/starter.c @@ -76,7 +76,8 @@ static uint8_t jumpnrun_pick_level_from_fd(char *buf, size_t *first_visible, siz } *selected = choice; - strcpy(buf, fnames[*selected]); + strncpy(buf, fnames[*selected], LEVELFILE_MAX); + buf[LEVELFILE_MAX] = '\0'; return 0; }