top: add more robustness to logic for reading a rcfile
At this point I don't know if the Rc.id ever carried a value of 'b', 'c', 'd' or 'e' in a public release. But I do know that those values ought not to be recognized in any configuration file. Now they won't be for sure. [ the net result is that now a user with such a file ] [ will see the 'incompatible rcfile' message instead ] [ of that misleading 'window entry corrupt' message. ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
		| @@ -3824,6 +3824,8 @@ static const char *configs_file (FILE *fp, const char *name, float *delay) { | ||||
|    } | ||||
|    if (Rc.id < 'a' || Rc.id > RCF_VERSION_ID) | ||||
|       return p; | ||||
|    if (strchr("bcde", Rc.id)) | ||||
|       return p; | ||||
|    if (Rc.mode_altscr < 0 || Rc.mode_altscr > 1) | ||||
|       return p; | ||||
|    if (Rc.mode_irixps < 0 || Rc.mode_irixps > 1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user