Changeset 1837


Ignore:
Timestamp:
Aug 2, 2015, 11:44:10 PM (10 years ago)
Author:
Gregg Young
Message:

Fixed trap in Stubby Ticket [534]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/flesh.c

    r1832 r1837  
    3232  17 Jan 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    3333  04 Aug 12 GKY Fix trap on close during drive scan
     34  02 Aug 15 GKY Fix trap in Stubby
    3435
    3536***********************************************************************/
     
    282283  static BOOL brokenlan = FALSE, isbroken = FALSE;
    283284
    284   if (!pciParent || !*pciParent->pszFileName
     285  if (!pciParent || (INT) pciParent == -1 || !*pciParent->pszFileName
    285286      || pciParent->pszFileName == NullStr || !hwndCnr)
    286287    return FALSE;
    287 
     288 
    288289  len = strlen(pciParent->pszFileName);
    289290  memcpy(str, pciParent->pszFileName, len + 1);
     
    398399    goto None;
    399400  }
    400 
     401 
    401402  if (!rc) {
    402403    DosFindClose(hDir);
     
    436437            (includefiles || (pffb->attrFile & FILE_DIRECTORY)) &&
    437438            // Skip . and ..
    438             (pffb->achName[0] != '.' || (pffb->achName[1]
     439            ((pffb->achName[0] && pffb->achName[0] != '.') || (pffb->achName[1]
    439440                                         && (pffb->achName[1] != '.'
    440441                                             || pffb->achName[2])))) {
     
    470471            ri.zOrder = (ULONG) CMA_TOP;
    471472            ri.cRecordsInsert = 1;
    472             ri.fInvalidateRecord = TRUE;
     473            ri.fInvalidateRecord = TRUE;
    473474            //DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD \"%s\" %.255s", hwndCnr, pci->pszFileName, pffb->achName); // 18 Dec 08 SHL fixme debug
    474475            if (!WinSendMsg(hwndCnr,
    475476                            CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) {
    476477              DosSleep(50); //05 Aug 07 GKY 100
    477               WinSetFocus(HWND_DESKTOP, hwndCnr);
    478               if (WinIsWindow((HAB)0, hwndCnr)) {
     478              WinSetFocus(HWND_DESKTOP, hwndCnr);
     479              if (WinIsWindow((HAB)0, hwndCnr)) {
    479480                //DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD %s", hwndCnr, pci->pszFileName); // 18 Dec 08 SHL fixme debug
    480481                if (!WinSendMsg(hwndCnr,
     
    489490            }
    490491            else
    491               ok = TRUE;
     492              ok = TRUE;
     493            }
    492494          }
    493495        }
    494       }
    495496      else if (toupper(*str) > 'B' && str[1] == ':' && str[2] == '\\' &&
    496497               !str[3]) {
Note: See TracChangeset for help on using the changeset viewer.