summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorGreg Knight <lyngvi@gmail.com>2018-11-25 15:47:18 -0500
committerGreg Knight <lyngvi@gmail.com>2018-11-27 18:57:18 -0500
commit903983bbd921a5139e3cd6de227b571870c764d8 (patch)
tree7b1d40bcfcc0afaaf6af2774d89bf17e777b154d /goo
parent8315a1234fb4332d202e3a728938359777706daa (diff)
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
Diffstat (limited to 'goo')
-rw-r--r--goo/GooString.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/goo/GooString.cc b/goo/GooString.cc
index e1fff699..0a22e283 100644
--- a/goo/GooString.cc
+++ b/goo/GooString.cc
@@ -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, ...) {