summaryrefslogtreecommitdiff
path: root/tests/test-common.c
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2021-07-02 00:14:08 +0200
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2021-07-02 00:16:46 +0200
commita492afdb4a6c2efbb66296a2aff58fe1afc6f78b (patch)
tree4f26f5ea9f9eb33873fb5af62b22ae988b6c7551 /tests/test-common.c
parentf4d37b82f71ab52eec64b7dbe0c06f683e2b5eca (diff)
downloadpango-a492afdb4a6c2efbb66296a2aff58fe1afc6f78b.tar.gz
tests: In attribute_from_string, parse offsets as long long
We need space for G_MAXUINT and 4294967285 (in testattributes.c). On i686, this requires long long, as long is only 32 bits wide.
Diffstat (limited to 'tests/test-common.c')
-rw-r--r--tests/test-common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-common.c b/tests/test-common.c
index a6339415..3b8880e3 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -225,7 +225,7 @@ attribute_from_string (const char *string)
{
char *s, *p;
PangoAttribute *attr;
- long start, end;
+ long long start, end;
GEnumClass *class;
int i;
PangoColor color;
@@ -234,14 +234,14 @@ attribute_from_string (const char *string)
g_assert (*s == '[');
s++;
- start = strtol (s, &p, 10);
+ start = strtoll (s, &p, 10);
g_assert (p > s);
g_assert (*p == ',');
s = p + 1;
g_assert (start >= 0);
- end = strtol (s, &p, 10);
+ end = strtoll (s, &p, 10);
g_assert (p > s);
g_assert (*p == ']');
s = p + 1;