[xiph-commits] r9975 - trunk/oggdsf/src/lib/codecs/cmml/libCMMLParse

davidb at svn.xiph.org davidb at svn.xiph.org
Tue Sep 6 14:09:57 PDT 2005


Author: davidb
Date: 2005-09-06 14:09:55 -0700 (Tue, 06 Sep 2005)
New Revision: 9975

Modified:
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLParse/CMMLParser.cpp
Log:
Fix read buffer reading problem when reading in files > 16K.

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLParse/CMMLParser.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLParse/CMMLParser.cpp	2005-09-06 11:51:51 UTC (rev 9974)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLParse/CMMLParser.cpp	2005-09-06 21:09:55 UTC (rev 9975)
@@ -87,13 +87,13 @@
 	// Read the entirety of the file into the buffer
 	locFile.seekg(0);
 
-	unsigned long BUFFER_SIZE = 262144;
+	unsigned short BUFFER_SIZE = 8192;
 	char *locBuffer = new char[locCMMLFileSize];
 	size_t locBytesRead = 0;
 
 	while (!locFile.eof()) {
 		locFile.read(locBuffer + locBytesRead, BUFFER_SIZE);
-		locBytesRead = locFile.gcount();
+		locBytesRead += locFile.gcount();
 	}
 
 	locFile.close();



More information about the commits mailing list