Skip to content

Commit

Permalink
Show warning if storage capacity is over MAX_STORAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonch35 committed Nov 5, 2024
1 parent 0cb567d commit 4aea3a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/map/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,10 @@ bool storage_config_read(const char* filename, bool imported)
continue;
}

s_conf.capacity = min(s_conf.capacity, MAX_STORAGE);
if (s_conf.capacity > MAX_STORAGE) {
ShowWarning("storage_config_read: Capacity for Storage #%d ('%s') is over MAX_STORAGE. Capping to %d.\n", s_conf.uid, s_conf.name, MAX_STORAGE);
s_conf.capacity = min(s_conf.capacity, MAX_STORAGE);
}

/* Additional Fields */
storage->config_read_additional_fields(t, &s_conf, filename);
Expand Down

0 comments on commit 4aea3a4

Please sign in to comment.