fix for GPF in C<print Win32::GetFullPathName('\\\\host\share')>
Gurusamy Sarathy [Wed, 18 Dec 2002 02:27:10 +0000 (02:27 +0000)]
p4raw-id: //depot/perl@18328

win32/win32.c

index 556d621..44642e6 100644 (file)
@@ -4677,8 +4677,13 @@ XS(w32_GetFullPathName)
     if (len) {
        if (GIMME_V == G_ARRAY) {
            EXTEND(SP,1);
-           XST_mPV(1,filepart);
-           len = filepart - SvPVX(fullpath);
+           if (filepart) {
+               XST_mPV(1,filepart);
+               len = filepart - SvPVX(fullpath);
+           }
+           else {
+               XST_mPVN(1,"",0);
+           }
            items = 2;
        }
        SvCUR_set(fullpath,len);