From 00111e46c5447410e9d5c1e854798c191e11494b Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Sun, 2 May 2021 06:55:53 +0200 Subject: [PATCH] change itoa to snprintf --- src/dev/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/device.h b/src/dev/device.h index f79ede49..61b8d01c 100644 --- a/src/dev/device.h +++ b/src/dev/device.h @@ -97,7 +97,7 @@ class BaseDevice { virtual std::string gpio_name(uint8_t pin) { char buffer[8]; - itoa(pin, buffer, 10); // DEC + snprintf(buffer, sizeof(buffer), "%d", pin); return buffer; } };