mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
parameter reading fixed in parse_config_file
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@159 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d483651798
commit
a7da6d1231
@ -257,7 +257,8 @@ int parse_config_file(struct config *conf, char *conffile)
|
|||||||
++line_pos;
|
++line_pos;
|
||||||
|
|
||||||
/* read the parameter */
|
/* read the parameter */
|
||||||
for (param_pos = 0; isalnum(line[line_pos]); /* NOTHING */) {
|
for (param_pos = 0; isprint(line[line_pos]) && !isspace(line[line_pos]);
|
||||||
|
/* NOTHING */) {
|
||||||
param[param_pos++] = line[line_pos++];
|
param[param_pos++] = line[line_pos++];
|
||||||
if (param_pos >= MAX_PARAM_LEN) {
|
if (param_pos >= MAX_PARAM_LEN) {
|
||||||
PRINT_LINENUM;
|
PRINT_LINENUM;
|
||||||
|
Loading…
Reference in New Issue
Block a user