Commit 903983bb authored by Greg Knight's avatar Greg Knight
Browse files

gooString::fromInt: Repair the return value.

formatInt renders from "right to left" and returns the position of the most significant digit in 'p' - which is not generally equal to 'buf' in the case of GooString::fromInt (unless you're rendering a 24-digit number.)

This repairs several issues in pdftohtml
parent 8315a123
......@@ -141,7 +141,7 @@ GooString *GooString::fromInt(int x) {
int len;
formatInt(x, buf, sizeof(buf), false, 0, 10, &p, &len);
return new GooString(buf, len);
return new GooString(p, len);
GooString *GooString::format(const char *fmt, ...) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment