d0740d4c68
- Support TrueColor displays - Better sound - .inf file attributes - Simplified NetBSD sound support with OSS compatibility - Provided a working MASTER_SITES - Took maintainership
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
$NetBSD: patch-af,v 1.1 2006/06/13 13:24:36 dsainty Exp $
|
|
|
|
Remove use of non-standard "a" modifier in scanf format. Under non-Linux
|
|
systems it is more likely to just core.
|
|
|
|
--- src/InfFS.c.orig 2002-01-16 04:46:43.000000000 +1300
|
|
+++ src/InfFS.c 2006-06-04 13:36:52.000000000 +1200
|
|
@@ -1516,24 +1516,23 @@
|
|
if ( !access ( beebfile, R_OK ) &&
|
|
( cat_fp = fopen ( entry->d_name, "r" ))) {
|
|
if ( fgets ( buff, 79, cat_fp ) > 0 ) {
|
|
+ char locked[10];
|
|
/*
|
|
* FIX ME
|
|
* Check for errors from malloc and sscanf
|
|
*/
|
|
p = malloc ( sizeof ( FileInfoL ));
|
|
- sscanf ( buff, "%*s %X %X %as",
|
|
- &(p->info.LoadAddress), &(p->info.ExeAddress), &lock );
|
|
+ locked[0] = '\0';
|
|
+ sscanf ( buff, "%*s %X %X %9s",
|
|
+ &(p->info.LoadAddress), &(p->info.ExeAddress), locked);
|
|
p->info.StartSector = 0;
|
|
stat ( beebfile, &sb );
|
|
p->info.FileLength = sb.st_size;
|
|
- if ( lock ) {
|
|
#ifdef XDFS
|
|
- if ( !strncmp ( lock, "Locked", 6 )) {
|
|
- p->info.LockFlag = 'L';
|
|
- }
|
|
-#endif
|
|
- free ( lock );
|
|
+ if ( !strncmp ( locked, "Locked", 6 )) {
|
|
+ p->info.LockFlag = 'L';
|
|
}
|
|
+#endif
|
|
/*
|
|
* Filenames are right-padded with spaces initially.
|
|
*/
|