Skip to content

Commit

Permalink
top.cc: remove hard coded values of MAX_SP (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-42-thought authored and brndnmtthws committed Dec 4, 2016
1 parent ddf8a0f commit 0523929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/top.cc
Expand Up @@ -661,8 +661,8 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj)
free_and_zero(obj->data.opaque);
return 0;
}
if (n < 1 || n > 10) {
NORM_ERR("invalid num arg for top. Must be between 1 and 10.");
if (n < 1 || n > MAX_SP) {
NORM_ERR("invalid num arg for top. Must be between 1 and %d.", MAX_SP);
free_and_zero(td->s);
free_and_zero(obj->data.opaque);
return 0;
Expand Down

0 comments on commit 0523929

Please sign in to comment.