Skip to content

Commit e05f878

Browse files
committed
Fixed high precision decoder
1 parent f7382f9 commit e05f878

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/mapcode.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@ int main(const int argc, const char** argv)
445445

446446
// Self-checking code to see if encoder produces this Mapcode for the lat/lon.
447447
if (SELF_CHECK) {
448+
const char* suffix = strstr(mapcode, "-");
449+
extraDigits = 0;
450+
if (suffix != 0) {
451+
extraDigits = strlen(suffix) - 1;
452+
}
448453
selfCheckLatLonToMapcode(lat, lon, defaultTerritory, mapcode, extraDigits);
449454
}
450455
}
@@ -671,6 +676,5 @@ int main(const int argc, const char** argv)
671676
usage(appName);
672677
return NORMAL_ERROR;
673678
}
674-
fprintf(stderr, "done\n");
675679
return 0;
676680
}

0 commit comments

Comments
 (0)