diff options
author | B. Watson <yalhcru@gmail.com> | 2014-01-07 06:16:47 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-01-07 11:14:01 -0600 |
commit | 00442188142d2f87dd69308b7a4d33bf6ed187b4 (patch) | |
tree | 7ab78b8ac1acd633dd8c24362ecdb885777447cf /development/as31/as31-fix-duplicate-line.patch | |
parent | 54d82a29f5f78ff07d9e4add0e02c00e8d12405f (diff) |
development/as31: Added (8031/8051 cross assembler).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/as31/as31-fix-duplicate-line.patch')
-rw-r--r-- | development/as31/as31-fix-duplicate-line.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/development/as31/as31-fix-duplicate-line.patch b/development/as31/as31-fix-duplicate-line.patch new file mode 100644 index 0000000000000..2d9dfc1e98f3d --- /dev/null +++ b/development/as31/as31-fix-duplicate-line.patch @@ -0,0 +1,24 @@ +diff --git a/as31/run.c b/as31/run.c +index 28c5317..9e5263b 100644 +--- a/as31/run.c ++++ b/as31/run.c +@@ -113,7 +113,8 @@ int run_as31(const char *infile, int lst, int use_stdout, + } + + while (!feof(finPre)) { +- getline(&lineBuffer,&sizeBuf,finPre); ++ if (getline(&lineBuffer,&sizeBuf,finPre) == -1) ++ break; + if ((includePtr=strstr(lineBuffer,INC_CMD))) { + includePtr=includePtr+strlen(INC_CMD); + while ((*includePtr==' ')|| //move includePtr to filename +@@ -138,7 +139,8 @@ int run_as31(const char *infile, int lst, int use_stdout, + mesg_f("Cannot open include file: %s\n",includePtr); + } else { + while (!feof(includeFile)) { +- getline(&incLineBuffer,&incSizeBuf,includeFile); ++ if (getline(&incLineBuffer,&incSizeBuf,includeFile) == -1) ++ break; + fprintf(fin,"%s",incLineBuffer); + if (strlen(incLineBuffer)) { + incLineCount++; |