소스 검색

fix buffer constructor

greatbridf 2 년 전
부모
커밋
23e86efdae
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      include/types/buffer.hpp

+ 3 - 3
include/types/buffer.hpp

@@ -50,9 +50,9 @@ public:
 
     constexpr buffer(const buffer& buf)
         : start { types::allocator_traits<allocator_type>::allocate(buf.end + 1 - buf.start) }
-        , end { start + buf.end - buf.start }
-        , base { start + buf.base - buf.start }
-        , head { start + buf.base - buf.start }
+        , end { (uint32_t)start + (uint32_t)buf.end - (uint32_t)buf.start }
+        , base { (uint32_t)start + (uint32_t)buf.base - (uint32_t)buf.start }
+        , head { (uint32_t)start + (uint32_t)buf.base - (uint32_t)buf.start }
         , count { buf.count }
     {
     }