From: Craig A. Berry Date: Sat, 6 Dec 2003 12:44:40 +0000 (-0600) Subject: casting bug in VMS part of Perl_start_glob X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ce6b0cbdd28668e4405f44a007bcb02edaf855d;p=p5sagit%2Fp5-mst-13.2.git casting bug in VMS part of Perl_start_glob From: "Craig A. Berry" Message-ID: <3FD22398.1060506@mac.com> p4raw-id: //depot/perl@21858 --- diff --git a/doio.c b/doio.c index 5ba40b9..af4d17d 100644 --- a/doio.c +++ b/doio.c @@ -2290,8 +2290,9 @@ Perl_start_glob (pTHX_ SV *tmpglob, IO *io) if (*cp == '?') *cp = '%'; /* VMS style single-char wildcard */ while (ok && ((sts = lib$find_file(&wilddsc,&rsdsc,&cxt, &dfltdsc,NULL,NULL,NULL))&1)) { - end = rstr + (unsigned long int) *rslt; - if (!hasver) while (*end != ';') end--; + /* with varying string, 1st word of buffer contains result length */ + end = rstr + *((unsigned short int*)rslt); + if (!hasver) while (*end != ';' && end > rstr) end--; *(end++) = '\n'; *end = '\0'; for (cp = rstr; *cp; cp++) *cp = _tolower(*cp); if (hasdir) {