소스 검색

gdbstub: Resolve sign conversion errors

Lioncash 6 년 전
부모
커밋
86a1eb7789
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/core/gdbstub/gdbstub.cpp

+ 2 - 1
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); }));
 }
 
 /**