Closed mateuszviste closed 3 months ago
this is because EDR's environment does not have a MCB, while SvarCOM relies on the presence of an MCB to compute the available space inside the environment block. The EDR scenario requires a more convoluted hack than what I initially did.
It would be best to create a fresh environment, which is properly linked in the MCB chain, from the config environment. I could put a dummy MCB in front of the config environment, not linked to the chain. But then we would loose 16 more bytes in the config environment. And trying to deallocate it would probably fail in a fatal manner.
Creating a new environment is exactly the plan. It's something that SvarCOM already knows how to do, the only trouble is for me to match all possible scenarios (EDR's config env, FreeDOS initial env, MS-DOS 5 with no env at all, /P, secondary shell, ...) and do the right thing for each case. I do not see any advantage of creating a fake MCB for EDR's config env. Sooner or later this would bite us back one way or another.
This is likely a side effect of the recent changes related to pulling in the EDR "config" environment into the default SvarCOM env.