diff --git a/hld/Eval.hx b/hld/Eval.hx index d03b369..7cca9d8 100644 --- a/hld/Eval.hx +++ b/hld/Eval.hx @@ -743,16 +743,20 @@ class Eval { } } + // global + var g = getGlobalAddress([name]); + if( g != ANone ) + return g; + // global (current package) if( tpack != null && tpack.length > 0 ) { tpack.push(name); var g = getGlobalAddress(tpack); - if( g != null ) + if( g != ANone ) return g; } - // global - return getGlobalAddress([name]); + return ANone; } function evalPath( path : Array ) : Value {