diff -ru upstream-patches/src/pmemd/src/file_io.F90 site/src/pmemd/src/file_io.F90 --- upstream-patches/src/pmemd/src/file_io.F90 2012-01-17 03:33:15.000000000 +0100 +++ site/src/pmemd/src/file_io.F90 2013-01-21 12:42:00.000000000 +0100 @@ -543,7 +543,7 @@ if (string(i:i) .ge. '0'.and. string(i:i) .le. '9') then ifirst = i do 100 j = ifirst, lenstr - if (string(i:i) .lt. '0' .or. string(i:i) .gt. '9') then + if (string(j:j) .lt. '0' .or. string(j:j) .gt. '9') then last = j - 1 goto 300 end if diff -ru upstream-patches/src/pmemd.amoeba/src/file_io.F90 site/src/pmemd.amoeba/src/file_io.F90 --- upstream-patches/src/pmemd.amoeba/src/file_io.F90 2012-01-17 03:33:15.000000000 +0100 +++ site/src/pmemd.amoeba/src/file_io.F90 2013-01-21 12:47:14.000000000 +0100 @@ -531,7 +531,7 @@ if (string(i:i) .ge. '0'.and. string(i:i) .le. '9') then ifirst = i do 100 j = ifirst, lenstr - if (string(i:i) .lt. '0' .or. string(i:i) .gt. '9') then + if (string(j:j) .lt. '0' .or. string(j:j) .gt. '9') then last = j - 1 goto 300 end if