Problem: 1613449
Title: (2-BYTE) Double Byte Characters
Received: Dec 16 1996 4:19PM
// cloned from MacApp code, to fix bug in argument to CharByte() short FindPos(const CStr255& pattern, CStr255& source) { short i = 0; short j = 0; short position = 0; do { ++i; position = i; for (j = 1; j <= pattern.Length(); ++j) if (!((source[i + j - 1] == pattern[j]) && (CharByte((Ptr) & source + 1, i + j - 2) == CharByte((Ptr) & pattern + 1, j - 1)))) { position = 0; break; } } while (!((position > 0) || (i >= source.Length() - pattern.Length() + 1))); return position; }
Fixed as recommended.