fix potential crash issue during startup

This commit is contained in:
Nick Krecklow 2020-04-01 20:41:18 -05:00
parent 65aabb179a
commit 364dc1ad59
No known key found for this signature in database
GPG Key ID: 5F149FDE156FFA94

2
app.js

@ -319,7 +319,7 @@ if (config.logToDatabase) {
var graphPeakPlayerCount = 0;
for (var x = 0; x < networkData.length; x++) {
// [1] refers to the online player count
var point = networkData[i][1];
var point = networkData[x][1];
if (point > 0 && (graphPeakIndex === -1 || point > graphPeakPlayerCount)) {
graphPeakIndex = x;
graphPeakPlayerCount = point;