Fix: Use proper printf format for string precision

This commit is contained in:
Denis Kenzior 2009-10-16 17:43:29 -05:00
parent 210bb5cc0a
commit 86cd4951b3
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ static void at_ussd_request(struct ofono_ussd *ussd, const char *str,
if (written > max_len)
goto error;
sprintf(buf, "AT+CUSD=1,\"%*s\",%d", (int) written, converted, dcs);
sprintf(buf, "AT+CUSD=1,\"%.*s\",%d", (int) written, converted, dcs);
g_free(converted);
converted = NULL;