From 86a1eb7789482456df503b74306dc5e1a28c1013 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Tue, 12 Nov 2019 05:05:13 -0500
Subject: gdbstub: Resolve sign conversion errors

---
 src/core/gdbstub/gdbstub.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/core/gdbstub/gdbstub.cpp')

diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp
index 20bb50868c..54ed680db9 100644
--- a/src/core/gdbstub/gdbstub.cpp
+++ b/src/core/gdbstub/gdbstub.cpp
@@ -468,7 +468,8 @@ static u8 ReadByte() {
 
 /// Calculate the checksum of the current command buffer.
 static u8 CalculateChecksum(const u8* buffer, std::size_t length) {
-    return static_cast<u8>(std::accumulate(buffer, buffer + length, 0, std::plus<u8>()));
+    return static_cast<u8>(std::accumulate(buffer, buffer + length, u8{0},
+                                           [](u8 lhs, u8 rhs) { return u8(lhs + rhs); }));
 }
 
 /**
-- 
cgit v1.2.3-70-g09d2