Permalink
Browse files

If at the end of the script file, close the script file

  • Loading branch information...
1 parent 21abf5f commit 40117199f071a5be6f1fb21f19e44fb3e8bf8995 @nbrown nbrown committed May 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/m0/c/m0_debugger.c
View
@@ -385,8 +385,10 @@ get_db_user_input(M0_Debugger_Info *db_info, M0_Debugger_Command *cmd, char *arg
p = get_line(input, 100, pFile);
if(db_info->input_source != NULL) {
- if(!feof(pFile))
+ if(feof(pFile)) {
fclose(pFile);
+ return NULL;
+ }
}
if (p) {

0 comments on commit 4011719

Please sign in to comment.