X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/f4ce05f33d3d5dcfbdd33a74a14c2ac23e379526..c8028bb0e1137541373f46638370b96f02924e32:/badge/jumpnrun/starter.c 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; }