summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox/snapshot.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-07-14 13:57:45 +0000
committerNils Wallménius <nils@rockbox.org>2009-07-14 13:57:45 +0000
commit3d4701a6e41616cf581a297bab1451cf2db70249 (patch)
treef845837c96ffbed7d59ddf8308f3b3e7c40cb8c9 /apps/plugins/zxbox/snapshot.c
parentc2900a1bacd5d98b57a0d15ea2add1bc08764057 (diff)
downloadrockbox-3d4701a6e41616cf581a297bab1451cf2db70249.tar.gz
rockbox-3d4701a6e41616cf581a297bab1451cf2db70249.zip
FS#10080
* Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/zxbox/snapshot.c')
-rw-r--r--apps/plugins/zxbox/snapshot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c
index d078ec78b1..9a68540a04 100644
--- a/apps/plugins/zxbox/snapshot.c
+++ b/apps/plugins/zxbox/snapshot.c
@@ -603,8 +603,7 @@ void save_snapshot_file(char *name)
603{ 603{
604 int type; 604 int type;
605 605
606 rb->strncpy(filenamebuf, name, MAXFILENAME-10); 606 rb->strlcpy(filenamebuf, name, MAXFILENAME-10 + 1);
607 filenamebuf[MAXFILENAME-10] = '\0';
608 607
609 type = SN_Z80; 608 type = SN_Z80;
610 if(check_ext(filenamebuf, "z80")) type = SN_Z80; 609 if(check_ext(filenamebuf, "z80")) type = SN_Z80;
@@ -642,8 +641,7 @@ void load_snapshot_file_type(char *name, int type)
642 int snsh; 641 int snsh;
643 SNFILE snfil; 642 SNFILE snfil;
644 643
645 rb->strncpy(filenamebuf, name, MAXFILENAME-10); 644 rb->strlcpy(filenamebuf, name, MAXFILENAME-10 + 1);
646 filenamebuf[MAXFILENAME-10] = '\0';
647 645
648 spcf_find_file_type(filenamebuf, &filetype, &type); 646 spcf_find_file_type(filenamebuf, &filetype, &type);
649 if(type < 0) type = SN_Z80; 647 if(type < 0) type = SN_Z80;