diff Resources/Patches/glog-ubuntu-18.04.diff @ 4686:d28eab3994f9 Orthanc-0.8.6

hotpatch to make Orthanc 0.8.6 compile on Ubuntu 18.04
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Jun 2021 14:57:16 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/Patches/glog-ubuntu-18.04.diff	Wed Jun 09 14:57:16 2021 +0200
@@ -0,0 +1,21 @@
+diff -urEb glog-0.3.2.orig/src/demangle.cc glog-0.3.2/src/demangle.cc
+--- glog-0.3.2.orig/src/demangle.cc	2021-06-09 14:45:34.648501148 +0200
++++ glog-0.3.2/src/demangle.cc	2021-06-09 14:46:07.376532698 +0200
+@@ -167,7 +167,7 @@
+ // Returns true if "str" has at least "n" characters remaining.
+ static bool AtLeastNumCharsRemaining(const char *str, int n) {
+   for (int i = 0; i < n; ++i) {
+-    if (str == '\0') {
++    if (str[i] == '\0') {
+       return false;
+     }
+   }
+@@ -223,7 +223,7 @@
+ // Returns true and advances "mangled_cur" if we find any character in
+ // "char_class" at "mangled_cur" position.
+ static bool ParseCharClass(State *state, const char *char_class) {
+-  if (state->mangled_cur == '\0') {
++  if (state->mangled_cur[0] == '\0') {
+     return false;
+   }
+   const char *p = char_class;