]> sigrok.org Git - libsigrok.git/commitdiff
scpi: Use locale independent sr_vsnprintf_ascii() and sr_vsprintf_ascii() functions.
authorFrank Stettner <redacted>
Sun, 11 Feb 2018 15:01:51 +0000 (16:01 +0100)
committerUwe Hermann <redacted>
Fri, 1 Jun 2018 13:46:17 +0000 (15:46 +0200)
src/scpi/scpi.c

index e2f5cd5870a8ec7d2fa61dc3eed6b2cb754246cc..82c95bfc7586850c0f8cd232b78c659707e6779f 100644 (file)
@@ -150,12 +150,12 @@ static int scpi_send_variadic(struct sr_scpi_dev_inst *scpi,
 
        /* Get length of buffer required. */
        va_copy(args_copy, args);
-       len = vsnprintf(NULL, 0, format, args_copy);
+       len = sr_vsnprintf_ascii(NULL, 0, format, args_copy);
        va_end(args_copy);
 
        /* Allocate buffer and write out command. */
        buf = g_malloc0(len + 2);
-       vsprintf(buf, format, args);
+       sr_vsprintf_ascii(buf, format, args);
        if (buf[len - 1] != '\n')
                buf[len] = '\n';