Changeset 1386 for trunk/dll/valid.c


Ignore:
Timestamp:
Jan 5, 2009, 9:21:15 PM (17 years ago)
Author:
Gregg Young
Message:

Fix IsBinary so it doesn't think codes like \xda are negative. Which fixes problem with texted opened as hex. Also use test binary in default view code so hex veiwer is used when appropriate. Tickets 326, 338

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/valid.c

    r1375 r1386  
    988988  if (str) {
    989989    while (x < len) {
    990       if (str[x] < ' ' && str[x] != '\r' && str[x] != '\n' && str[x] != '\t'
    991           && str[x] != '\x1b' && str[x] != '\x1a' && str[x] != '\07'
    992           && str[x] != '\x0c')
    993         return TRUE;
     990      if ((UINT) str[x] < ' ' && str[x] != '\r' && str[x] != '\n' && str[x] != '\t'
     991          && str[x] != '\x1b' && str[x] != '\x1a' && str[x] != '\x07'
     992          && str[x] != '\x0c') {
     993        //DbgMsg(pszSrcFile, __LINE__, "IsBinary str %x x %x len %x", str[x], x, len);
     994        return TRUE;
     995      }
    994996      x++;
    995997    }
Note: See TracChangeset for help on using the changeset viewer.