monitor: fix setting max_user_watches.

reset file position after read.
This commit is contained in:
Vlad Starodubtsev 2019-04-02 19:57:53 +03:00 committed by Justin Maggard
parent 347aafa6d7
commit 204a0ded8d

View File

@ -105,8 +105,9 @@ raise_watch_limit(unsigned int limit)
return; return;
if (!limit) if (!limit)
{ {
if (fscanf(max_watches, "%u", &limit) < 1) if (fscanf(max_watches, "%10u", &limit) < 1)
limit = 8192; limit = 8192;
rewind(max_watches);
} }
fprintf(max_watches, "%u", next_highest(limit)); fprintf(max_watches, "%u", next_highest(limit));
fclose(max_watches); fclose(max_watches);