fix up binary fields

This commit is contained in:
Glenn Maynard
2002-12-14 06:17:52 +00:00
parent 74d1bb00a6
commit 89ae8e35a4
+13 -1
View File
@@ -139,8 +139,20 @@ void MsdFile::ReadBuf( char *buf, int len )
{
i++; /* skip */
value_start = i;
if(buf[value_start] == '\001')
/* If there's a \001 (^A) after the : (possibly separated by whitespace),
* it's binary. */
bool Found001 = false;
int pos = value_start;
do {
if(buf[pos] == '\001') { Found001 = true; break; }
if(!strchr("\r\n\t ", buf[pos])) break;
pos++;
} while(pos < len);
if(Found001)
{
value_start = pos;
value_start++;
/* Binary param. Expect digits followed by a comma. */