OSDN Git Service

[Fix] #2363 シンボルエディタのシンボルが非表示になることがある不具合を修正した
authorHourier <66951241+Hourier@users.noreply.github.com>
Wed, 7 Jun 2023 12:32:50 +0000 (21:32 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Wed, 7 Jun 2023 12:32:50 +0000 (21:32 +0900)
src/io-dump/dump-util.cpp

index 3d5d198..1460a32 100644 (file)
@@ -64,8 +64,8 @@ bool visual_mode_command(char ch, bool *visual_list_ptr,
         }
 
         *visual_list_ptr = true;
-        *attr_top_ptr = std::max<byte>(0, (*cur_attr_ptr & 0x7f) - 5);
-        *char_left_ptr = std::max<byte>(0, *cur_char_ptr - 10);
+        *attr_top_ptr = std::max<int8_t>(0, (*cur_attr_ptr & 0x7f) - 5);
+        *char_left_ptr = std::max<int8_t>(0, *cur_char_ptr - 10);
         attr_old = *cur_attr_ptr;
         char_old = *cur_char_ptr;
         return true;
@@ -85,7 +85,7 @@ bool visual_mode_command(char ch, bool *visual_list_ptr,
     case 'p': {
         if (attr_idx || (!(char_idx & 0x80) && char_idx)) {
             *cur_attr_ptr = attr_idx;
-            *attr_top_ptr = std::max<byte>(0, (*cur_attr_ptr & 0x7f) - 5);
+            *attr_top_ptr = std::max<int8_t>(0, (*cur_attr_ptr & 0x7f) - 5);
             if (!*visual_list_ptr) {
                 *need_redraw = true;
             }
@@ -94,7 +94,7 @@ bool visual_mode_command(char ch, bool *visual_list_ptr,
         if (char_idx) {
             /* Set the char */
             *cur_char_ptr = char_idx;
-            *char_left_ptr = std::max<byte>(0, *cur_char_ptr - 10);
+            *char_left_ptr = std::max<int8_t>(0, *cur_char_ptr - 10);
             if (!*visual_list_ptr) {
                 *need_redraw = true;
             }