[cig-commits] r4421 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/module
baagaard at geodynamics.org
baagaard at geodynamics.org
Thu Aug 24 14:27:30 PDT 2006
Author: baagaard
Date: 2006-08-24 14:27:30 -0700 (Thu, 24 Aug 2006)
New Revision: 4421
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc
Log:
Fixed bug in scanner wherein iIgnoreComments_PyLith didn't terminate on encountering '\0'. This brings the ignore comments functionality in line with what is in meshpylith.c in PETSc.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc 2006-08-24 20:56:09 UTC (rev 4420)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc 2006-08-24 21:27:30 UTC (rev 4421)
@@ -48,7 +48,7 @@
PetscErrorCode IgnoreComments_PyLith(char *buf, PetscInt bufSize, FILE *f)
{
PetscFunctionBegin;
- while((fgets(buf, bufSize, f) != NULL) && (buf[0] == '#')) {}
+ while((fgets(buf, bufSize, f) != NULL) && ((buf[0] == '#') || (buf[0] == '\0'))) {}
PetscFunctionReturn(0);
}
More information about the cig-commits
mailing list