[pango: 1/3] tests: In attribute_from_string, parse offsets as long long




commit a492afdb4a6c2efbb66296a2aff58fe1afc6f78b
Author: Jan Alexander Steffens (heftig) <jan steffens gmail com>
Date:   Fri Jul 2 00:14:08 2021 +0200

    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.

 tests/test-common.c | 6 +++---
 1 file 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]