Skip to content

Commit

Permalink
Fix bug in dFilePathSplit() that was looping in the wrong direction.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Jun 10, 2011
1 parent 5c53c27 commit bf51caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dErr dFilePathSplit(const char *path,dInt *slash,dInt *dot)
if (path[i] == '/' || i == 1) dERROR(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Path '%s' does not contain valid suffix",path);
}
*slash = -1;
for ( ; i>=0; i++) {
for ( ; i>=0; i--) {
if (path[i] == '/') {*slash = i; break;}
}
dFunctionReturn(0);
Expand Down

0 comments on commit bf51caf

Please sign in to comment.