X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fxio.c;h=1ce515727a0d7330143b4f7df478e12d414aa883;hp=4a3f18176296c59db7cf91067d7bc0e989a1909b;hb=89572e84169557fe3c70b5de619c274ceaf7b028;hpb=ae821dcebb67784c59011f3113ba840d81ca6a45 diff --git a/support/nfs/xio.c b/support/nfs/xio.c index 4a3f181..1ce5157 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -95,6 +95,11 @@ xgettok(XFILE *xfp, char sepa, char *tok, int len) while (i < len && (c = xgetc(xfp)) != EOF && (quoted || (c != sepa && !isspace(c)))) { + if (!quoted && i == 0 && c == '#') { + c = xskipcomment(xfp); + xfp->x_line++; + break; + } if (c == '"') { quoted = !quoted; continue; @@ -138,8 +143,6 @@ xgetc(XFILE *xfp) ungetc(c, xfp->x_fp); return ' '; } - if (c == '#') - c = xskipcomment(xfp); if (c == '\n') xfp->x_line++; return c;