/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 253 by ph10, Mon Sep 17 10:51:30 2007 UTC revision 256 by ph10, Wed Sep 19 08:57:53 2007 UTC
# Line 717  bool Arg::parse_short_radix(const char* Line 717  bool Arg::parse_short_radix(const char*
717    long r;    long r;
718    if (!parse_long_radix(str, n, &r, radix)) return false; // Could not parse    if (!parse_long_radix(str, n, &r, radix)) return false; // Could not parse
719    if (r < SHRT_MIN || r > SHRT_MAX) return false;       // Out of range    if (r < SHRT_MIN || r > SHRT_MAX) return false;       // Out of range
720    *(reinterpret_cast<short*>(dest)) = r;    *(reinterpret_cast<short*>(dest)) = static_cast<short>(r);
721    return true;    return true;
722  }  }
723    
# Line 728  bool Arg::parse_ushort_radix(const char* Line 728  bool Arg::parse_ushort_radix(const char*
728    unsigned long r;    unsigned long r;
729    if (!parse_ulong_radix(str, n, &r, radix)) return false; // Could not parse    if (!parse_ulong_radix(str, n, &r, radix)) return false; // Could not parse
730    if (r > USHRT_MAX) return false;                      // Out of range    if (r > USHRT_MAX) return false;                      // Out of range
731    *(reinterpret_cast<unsigned short*>(dest)) = r;    *(reinterpret_cast<unsigned short*>(dest)) = static_cast<unsigned short>(r);
732    return true;    return true;
733  }  }
734    

Legend:
Removed from v.253  
changed lines
  Added in v.256

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12