summaryrefslogtreecommitdiff
path: root/extra/thunar/fix-sorting-of-large-numbers-5356.patch
blob: 1105eea8366a7e9cc683a92bff076165e201f8a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 493db02bdbc6ec667cd04e75a77dff8366ec1bc0 Mon Sep 17 00:00:00 2001
From: Eric Koegel <eric.koegel@gmail.com>
Date: Sun, 06 Nov 2011 13:58:33 +0000
Subject: Fix sorting of filenames with large numbers (bug #5356).

Change compare_by_name_using_number() to use guint64.

Signed-off-by: Jannis Pohlmann <jannis@xfce.org>
---
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 909da25..44cdb31 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3168,12 +3168,12 @@ static gint
 compare_by_name_using_number (const gchar *ap,
                               const gchar *bp)
 {
-  guint anum;
-  guint bnum;
+  guint64 anum;
+  guint64 bnum;
 
   /* determine the numbers in ap and bp */
-  anum = strtoul (ap, NULL, 10);
-  bnum = strtoul (bp, NULL, 10);
+  anum = strtouq (ap, NULL, 10);
+  bnum = strtouq (bp, NULL, 10);
 
   /* compare the numbers */
   if (anum < bnum)
--
cgit v0.9.0.2