Browse Source

Fixed parameters array size declaration (wouldn't have a side-effect but weird and misleading)

Thanks Coverity
ocornut 10 năm trước cách đây
mục cha
commit
1a3ef63132
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      imgui.cpp

+ 2 - 2
imgui.cpp

@@ -6453,12 +6453,12 @@ bool ImGui::DragFloat2(const char* label, float v[2], float v_speed, float v_min
     return DragFloatN(label, v, 2, v_speed, v_min, v_max, display_format, power);
 }
 
-bool ImGui::DragFloat3(const char* label, float v[2], float v_speed, float v_min, float v_max, const char* display_format, float power)
+bool ImGui::DragFloat3(const char* label, float v[3], float v_speed, float v_min, float v_max, const char* display_format, float power)
 {
     return DragFloatN(label, v, 3, v_speed, v_min, v_max, display_format, power);
 }
 
-bool ImGui::DragFloat4(const char* label, float v[2], float v_speed, float v_min, float v_max, const char* display_format, float power)
+bool ImGui::DragFloat4(const char* label, float v[4], float v_speed, float v_min, float v_max, const char* display_format, float power)
 {
     return DragFloatN(label, v, 4, v_speed, v_min, v_max, display_format, power);
 }