Ver código fonte

Replace sprintf with snprintf (to address g++ warnings).

adeniz_1
Alban Deniz 11 meses atrás
pai
commit
83ab35b32f
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3
    1
      SNFMulti.cpp

+ 3
- 1
SNFMulti.cpp Ver arquivo

@@ -298,7 +298,9 @@ string FileUTC(string FileName) {

char TimestampBfr[20]; // Timestamp buffer.

sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
size_t l = snprintf( // Format yyyymmddhhmmss
TimestampBfr, sizeof(TimestampBfr),
"%04d%02d%02d%02d%02d%02d",
FileNameTime.tm_year+1900,
FileNameTime.tm_mon+1,
FileNameTime.tm_mday,

Carregando…
Cancelar
Salvar