--- ray/src/rt/mkpmap.c 2016/03/10 18:25:46 2.3 +++ ray/src/rt/mkpmap.c 2016/03/21 19:06:08 2.4 @@ -7,7 +7,7 @@ Lucerne University of Applied Sciences & Arts ================================================================== - $Id: mkpmap.c,v 2.3 2016/03/10 18:25:46 schorsch Exp $ + $Id: mkpmap.c,v 2.4 2016/03/21 19:06:08 greg Exp $ */ @@ -297,8 +297,8 @@ int main (int argc, char* argv []) if (argv[i][3] == 'O') { /* Get port modifiers file */ - rval = wordfile(portLp, getpath(argv [++i], - getrlibpath(), R_OK)); + rval = wordfile(portLp, AMBLLEN-(portLp-amblist), + getpath(argv [++i], getrlibpath(), R_OK)); if (rval < 0) { sprintf(errmsg, "cannot open photon port file %s", argv [i]); @@ -328,8 +328,8 @@ int main (int argc, char* argv []) if (argv[i][3] == 'S') { /* Get sensor modifiers from file */ - rval = wordfile(sensLp, getpath(argv [++i], - getrlibpath(), R_OK)); + rval = wordfile(sensLp, MAXSET-(sensLp-photonSensorList), + getpath(argv [++i], getrlibpath(), R_OK)); if (rval < 0) { sprintf(errmsg, "cannot open antimatter sensor file %s", argv [i]);