Dave LUFF: Fix buffer overrun with longer runways
This commit is contained in:
parent
4aff7b279d
commit
5a200cb5f4
1 changed files with 2 additions and 3 deletions
|
@ -257,9 +257,8 @@ void GPSPage::OBSPressed() {}
|
||||||
void GPSPage::MsgPressed() {}
|
void GPSPage::MsgPressed() {}
|
||||||
|
|
||||||
string GPSPage::GPSitoa(int n) {
|
string GPSPage::GPSitoa(int n) {
|
||||||
char buf[4];
|
char buf[6];
|
||||||
// TODO - sanity check n!
|
snprintf(buf, 6, "%i", n);
|
||||||
sprintf(buf, "%i", n);
|
|
||||||
string s = buf;
|
string s = buf;
|
||||||
return(s);
|
return(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue