Sfoglia il codice sorgente

Changed parseSubstring to return uint16_t to avoid cast issue for year

tags/v1.3.0^2
Bertrand Lemasle 6 anni fa
parent
commit
62b33ce260
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      src/Gps.cpp

+ 2
- 2
src/Gps.cpp Vedi File

@@ -19,9 +19,9 @@
namespace gps {
namespace details {
uint8_t parseSubstring(char *buffer, char *start, uint8_t size) {
uint16_t parseSubstring(char *buffer, char *start, uint8_t size) {
strlcpy(buffer, start, size + 1);
return static_cast<uint8_t>(strtoul(buffer, NULL, 10));
return static_cast<uint16_t>(strtoul(buffer, NULL, 10));
}
}


Caricamento…
Annulla
Salva