Skip to content

[BUG] Config select selects in the configFile hierarchy #181

@Coryf88

Description

@Coryf88

Describe the bug

class CfgPatches {
	class Addon {
		name = "";
		author = "";
		url = "";
	};
	class Addon2 {};
};
class A {};
class B {};

configFile select 0 returns CfgPatches, as expected.
configFile select 1 returns Addon2
configFile select 2 returns url
(configFile >> "CfgPatches") select 0 returns CfgPatches
(configFile >> "CfgPatches") select 1 returns Addon2
(configFile >> "CfgPatches") select 2 throws The requested index two exceeds the available range of two., as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Execute sqfvm.exe --automated --config "class CfgPatches {class Addon {};};" --sqf "(configFile >> ""CfgPatches"") select 0"
  2. Notice [INF] Context droped with return value 'CfgPatches'.

Expected behavior
[INF] Context droped with return value 'Addon'.

Screenshots
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugError, flaw, failure or fault that causes to produce an incorrect result or crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions