Skip to content

Floating point format support in sprintf #1179

Closed
@eng1n88r

Description

@eng1n88r

Hi,

Was working with ESP8266 and found issue with snprintf.

Here is the sample:

char _converted[33];
float value = 10;
int size = sizeof(_converted)-1;

snprintf(_converted, size, "Value is %.2f", value);
Serial.print("Core test: "); Serial.println(_converted);

Expected result was: Core test: Value is 10.00
Actual result is: Core test: Value is %.2f

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions