aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index ad4d338f..e7c1261b 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.240 2011/12/06 16:33:55 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.241 2012/03/18 16:52:49 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -616,8 +616,10 @@ static int skipBOM (LoadF *lf) {
616static int skipcomment (LoadF *lf, int *cp) { 616static int skipcomment (LoadF *lf, int *cp) {
617 int c = *cp = skipBOM(lf); 617 int c = *cp = skipBOM(lf);
618 if (c == '#') { /* first line is a comment (Unix exec. file)? */ 618 if (c == '#') { /* first line is a comment (Unix exec. file)? */
619 while ((c = getc(lf->f)) != EOF && c != '\n') ; /* skip first line */ 619 do { /* skip first line */
620 *cp = getc(lf->f); /* skip end-of-line */ 620 c = getc(lf->f);
621 } while (c != EOF && c != '\n') ;
622 *cp = getc(lf->f); /* skip end-of-line, if present */
621 return 1; /* there was a comment */ 623 return 1; /* there was a comment */
622 } 624 }
623 else return 0; /* no comment */ 625 else return 0; /* no comment */