mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
fix linux crash on sscanf failure
This commit is contained in:
parent
9f5d67497d
commit
cb42ef255b
@ -326,7 +326,7 @@ void SysAddDiskPrefs(void)
|
||||
line[len-1] = 0;
|
||||
|
||||
// Parse line
|
||||
char *dev, *mnt_point, *fstype;
|
||||
char *dev = NULL, *mnt_point = NULL, *fstype = NULL;
|
||||
if (sscanf(line, "%as %as %as", &dev, &mnt_point, &fstype) == 3) {
|
||||
if (strcmp(fstype, "hfs") == 0)
|
||||
PrefsAddString("disk", dev);
|
||||
|
Loading…
Reference in New Issue
Block a user