#391 Behaviour of SET command broken: cannot assign strings containing "/p"

SVN
open
None
5
2013-05-10
2013-04-21
Rainer
No

The additional lines 745+746 in src/shell/shell_cmds.cpp break the behaviour of SET command. It is no more possible assigning strings to a variable that contain /p. For example, I used to add a line set dircmd=/p/w in autoexec section. This is now impossible, nor it is for any combination where the assigned string contains /p.

The intention for this change in r3825 may be that you don’t want the SET command supporting the /p option as it is no valid option for the DOS style SET command. But it is neccessary to check if /p is meant as an option or as a string assignment to a variable (which is quite valid SET behaviour).

I suggest checking if /p is given before or after the first “=” character, or remove the causing code lines at all.

Discussion

  • Peter Veenstra
    Peter Veenstra
    2013-05-09

    Can you try the current SVN ?

    It should be fixed there

     
  • Rainer
    Rainer
    2013-05-10

    From the view of the code it seems fixed, though I cannot try it myself properly. When compiling any revision from r3825 upwards my dosbox crashes on executing the used E_Exit() routine. This is not bug-related but my own toolchain failure. (I discovered the bug by using a recent SVN build from Daum, and normally I don’t intend on building DOSBox by myself.)

    The fix seems ok, it checks on using “/p ” only at the beginning of a set command. Not quite what I had in mind (it makes more sense checking if “/p” is used before the first occurence of “=”), but works for me and allows for setting the dircmd variable as requested. Thank you. :)