This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit a8504e64ba90c624302eced030b37a5f2c4745b6
Author: Mihai Moldovan <io...@ionic.de>
Date:   Sat May 12 02:27:03 2018 +0200

    src/onmainwindow.{cpp,h}: fix compile error on Windows - use std::size_t 
instead of std::ssize_t, treat zero as infinity value while parsing option 
value.
---
 debian/changelog     |  3 +++
 src/onmainwindow.cpp | 12 +++++++++---
 src/onmainwindow.h   |  2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e030e15..24845cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,9 @@ x2goclient (4.1.2.0-0x2go1) UNRELEASED; urgency=medium
     - {src/{onmainwindow.{cpp,h},help.cpp},man/man1/x2goclient.1}: add new
       option --xserver-start-limit, replacing the formerly hardcoded limit of
       three tries.
+    - src/onmainwindow.{cpp,h}: fix compile error on Windows - use std::size_t
+      instead of std::ssize_t, treat zero as infinity value while parsing
+      option value.
   * x2goclient.spec:
     - Remove plugin references.
   * debian/rules:
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 0b6ec1f..788751e 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -7677,10 +7677,16 @@ bool ONMainWindow::parseParameter ( QString param )
             if (0 >= conv) {
                 x2goDebug << "Not limiting X.Org Server starts.";
 
-                x_start_limit_ = -1;
+                x_start_limit_ = 0;
             {
             else {
-                x_start_limit = conv;
+                if (SIZE_MAX < conv) {
+                    conv = SIZE_MAX;
+
+                    x2goDebug << "Clamped X.Org Server start limit to 
SIZE_MAX.";
+                }
+
+                x_start_limit_ = conv;
 
                 x2goDebug << "Limiting X.Org Server starts to " << 
x_start_limit << " tries.";
             }
@@ -7688,7 +7694,7 @@ bool ONMainWindow::parseParameter ( QString param )
         else {
             x2goDebug << "Conversion for --xserver-start-limit value " << 
value << " failed; assuming default of 3.";
 
-            x_start_limit = 3;
+            x_start_limit_ = 3;
         }
     }
 #endif /* defined(Q_OS_WIN) */
diff --git a/src/onmainwindow.h b/src/onmainwindow.h
index dad4f1f..47eaa5e 100644
--- a/src/onmainwindow.h
+++ b/src/onmainwindow.h
@@ -877,7 +877,7 @@ private:
     QString xorgHeight;
     int waitingForX;
     std::size_t x_start_tries_;
-    std::ssize_t x_start_limit_;
+    std::size_t x_start_limit_;
     QRect dispGeometry;
 #endif
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to