changeset 48964:9ce563fb2989 stable

revlog: fix wrong type of rank_unknown variable We treat "rank" as an int everywhere, but declare rank_unknown as a char. On architectures where char is signed, that works out ok, but when char is unsigned, rank_unknown is 255 instead of -1. Differential Revision: https://phab.mercurial-scm.org/D12374
author Julien Cristau <jcristau@debian.org>
date Mon, 14 Mar 2022 17:57:03 +0100
parents 59be65b7cdfd
children a82f5d2b48fb b10a944c0486
files mercurial/cext/revlog.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Mon Mar 14 14:10:41 2022 +0000
+++ b/mercurial/cext/revlog.c	Mon Mar 14 17:57:03 2022 +0100
@@ -179,7 +179,7 @@
 /* next free offset: 73 */
 
 static const char comp_mode_inline = 2;
-static const char rank_unknown = -1;
+static const int rank_unknown = -1;
 
 static void raise_revlog_error(void)
 {