obp_nextprop(node,name) calls the Forth word "next-property" then pops the result. "next-property" should therefore always return something : * A string when the property provided is not the last one of the node. * Zero when the property provided is the last one of the node. * Zero when the property provided does not exist in the current node.
Previously, next-property returned nothing when the property didn't exist.
"next-property" behavior with last and nonexistant properties differs between implementations of OF.
This problem was found with NetBSD on Sparc32. It ennumerates peripherals when starting X11 and asks for the "name" and "device_type" property of many nodes, including some which have neither "name" nor "device_type" properties.
Signed-off-by: Olivier Danet odanet@caramail.com =================================================================== --- forth/device/property.fs (révision 1257) +++ forth/device/property.fs (copie de travail) @@ -70,7 +70,7 @@ 2drop r> >dn.properties @ else r> find-property dup if @ then - ?dup if >prop.next @ then + dup if >prop.next @ then then
?dup if ===================================================================