From 3aad34058bc841f1b65de0c017324962d12c1e24 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 1 Jun 2006 21:53:58 +0000 Subject: [PATCH] Added NULL fp checking iniReadFile(). --- src/xpdev/ini_file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c index 5c7e05f9bf..40b70cecc0 100644 --- a/src/xpdev/ini_file.c +++ b/src/xpdev/ini_file.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public License * @@ -1668,7 +1668,8 @@ str_list_t iniReadFile(FILE* fp) str_list_t list; FILE* insert_fp=NULL; - rewind(fp); + if(fp!=NULL) + rewind(fp); list = strListReadFile(fp, NULL, INI_MAX_LINE_LEN); if(list==NULL) -- GitLab