[antlr-interest] Bug in ANTLReaderStream.load()?
    Sam Ellis 
    sam.ellis at arm.com
       
    Sun Jul 29 10:59:12 PDT 2007
    
    
  
Using: ANTLR Parser Generator  Version 3.0 (May 17, 2007)  1989-2007
The Java method org.antlr.runtime.ANTLRReaderStream.load() contains:
if ( readChunkSize<=0 ) {
    size = READ_BUFFER_SIZE;
}
Shouldn't this be assigning to readChunkSize instead of size? Because
otherwise you're later going to call Java.io.reader.read() with a negative
number of bytes to read.
-- 
Sam Ellis, RVDK Team Leader,
DevSys Product Engineering Group,          Tel: +44 (0) 1223 400516
ARM Ltd., 110 Fulbourn Road,               Fax: +44 (0) 1223 400887
Cambridge, CB1 9NJ                         mailto:Sam.Ellis at arm.com
-- 
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.
    
    
More information about the antlr-interest
mailing list