From a58cfdac407bc1d8fedc11acd924b275ba28cc51 Mon Sep 17 00:00:00 2001 From: "SND\\dario86_cp" Date: Sat, 12 Mar 2011 18:54:28 +0000 Subject: Commited patch in issue #8171 (by darktjm). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64524 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfnet/cfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/dfnet/cfg.c') diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c index 921efbe3..69d25b12 100644 --- a/plugins/dfnet/cfg.c +++ b/plugins/dfnet/cfg.c @@ -18,7 +18,8 @@ void SaveConf() { f = fopen(CFG_FILENAME, "w"); if (f == NULL) return; - fwrite(&conf, 1, sizeof(conf), f); + if(fwrite(&conf, sizeof(conf), 1, f) != 1) + perror(CFG_FILENAME); fclose(f); } @@ -33,6 +34,7 @@ void LoadConf() { return; } - fread(&conf, 1, sizeof(conf), f); + if(fread(&conf, sizeof(conf), 1, f) != 1) + perror(CFG_FILENAME); fclose(f); } -- cgit v1.2.3