diff --git a/lib/modules/ADT.pmod/Struct.pike b/lib/modules/ADT.pmod/Struct.pike index 2c064f694de23f37b1ba4550706aa0317ea968d7..ad335ee724126c05d122d719776f89063c7a7a72 100644 --- a/lib/modules/ADT.pmod/Struct.pike +++ b/lib/modules/ADT.pmod/Struct.pike @@ -48,7 +48,15 @@ int id = ADT.get_item_id(); //! Data to be decoded and populate the struct. Can //! either be a file object or a string. optional protected void create(void|string|object file) { - foreach(::_indices(this, 0), string index) { + foreach( +#if __BUILD__ < 368 + // NB: Prior to 8.0.368 the new-style argument checking in _indices() + // was broken. + ::_indices(2), +#else + ::_indices(this, 0), +#endif + string index) { mixed val = ::`[](index, this, 0); if(objectp(val) && val->is_item) names[index]=val; } diff --git a/lib/modules/Arg.pmod b/lib/modules/Arg.pmod index 28c9ac3dc1f653168f8c3342771022db96389fbf..8045e2e4f0b5184509ee2bad36111b0b5665096b 100644 --- a/lib/modules/Arg.pmod +++ b/lib/modules/Arg.pmod @@ -418,7 +418,15 @@ class LowOptions env = getenv(); // Make a list of all the arguments we can parse. - foreach(::_indices(this, 0), string index) + foreach( +#if __BUILD__ < 368 + // NB: Prior to 8.0.368 the new-style argument checking in _indices() + // was broken. + ::_indices(2), +#else + ::_indices(this, 0), +#endif + string index) { mixed val = ::`[](index, this, 0); if(objectp(val) && val->is_opt) opts[index]=val;