Nasty bug in dtostrf

I’ve found a strange issue that seems like a nasty bug in dtostrf. I’ve noticed it when converting gps longitudes into strings. I don’t have an arduino zero to check on it.
Find bellow the code that reproduces the error, in my Autonomo (with the latests updates in all libraries) I get from the serial monitor:

String from dtostrf: -5.424

so the double is converted to the wrong string.

Here is the test code:

#include <avr/dtostrf.h>
char strLng[12];
float gpslong=-5.575418;
void setup() {

void loop() {
  dtostrf (gpslong, 11,6, strLng); 
  SerialUSB.print("String from dtostrf: ");



With the test version of the upcoming v1.6.7 SODAQ Boards Manager it is solved.
See my other post on the forum about Boards Manager for LoRaONE beta

The result of your code, for me, is:

String from dtostrf:   -5.575418

BTW. To add C code in your post you have to add 4 spaces at the start of each line.

Thanks a lot. Solved.