From b6f71ca1db40c7c4854d697b6a4e8cf47e143534 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Fri, 11 Sep 2020 22:17:45 -0700 Subject: [PATCH] Update screen.cpp for for crash when gps gets lock Update screen.cpp for for crash when gps gets a lock --- src/graphics/Screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ff3204365..5229f5660 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -250,7 +250,7 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const displayLine = "No GPS Lock"; display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); } else { - char coordinateLine[20]; + char coordinateLine[22]; sprintf(coordinateLine, "%f %f", gps->getLatitude() * 1e-7, gps->getLongitude() * 1e-7); display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(coordinateLine))) / 2, y, coordinateLine); }