help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] buglet in FileDescriptor>>pastEnd


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] buglet in FileDescriptor>>pastEnd
Date: Wed, 15 Jul 2009 20:51:20 +0200

> With this patch applied, I get the correct error
>
> UndefinedObject(Object)>>doesNotUnderstand: #asInteger (AnsiExcept.st:1556)
> ObjectDumper>>nextByte (ObjDumper.st:644)
> ObjectDumper>>loadClass (ObjDumper.st:390)
>
> which still should be caught somewhere in ObjectDumper, I think.

This should suffice, any other place where we find an end-of-file
identifies an error in the binary stream and does not need to be
handled -- does it?

diff --git a/kernel/ObjDumper.st b/kernel/ObjDumper.st
index 88a6f54..12a6e4c 100644
--- a/kernel/ObjDumper.st
+++ b/kernel/ObjDumper.st
@@ -293,6 +293,7 @@
        "Special-case metaclasses and other objects"

        | index |
+       stream atEnd ifTrue: [^self pastEnd].
        index := self nextLong.
        ^index < 0
            ifTrue: [self specialCaseLoad: index]

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]