From 18ca88a0d4061b3f04ea4f8787eb7730c0be8d39 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 14 Jan 2024 21:48:41 +0100 Subject: [PATCH] asan in flake --- flake.nix | 7 +++++++ src/chat_gui4.cpp | 1 + 2 files changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index e488cfa6..58e84759 100644 --- a/flake.nix +++ b/flake.nix @@ -55,12 +55,19 @@ libsodium ] ++ self.packages.${system}.default.dlopenBuildInputs; + cmakeFlags = [ + "TOMATO_ASAN=1" + "CMAKE_BUILD_TYPE=RelWithDebInfo" + ]; + # TODO: replace with install command installPhase = '' mkdir -p $out/bin mv bin/tomato $out/bin ''; + dontStrip = true; + # copied from nixpkgs's SDL2 default.nix # SDL is weird in that instead of just dynamically linking with # libraries when you `--enable-*` (or when `configure` finds) them diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index 22c5e62b..172952ed 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -520,6 +520,7 @@ void ChatGui4::render(float time_delta) { //} else if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) { } else if (ImGui::BeginPopupContextItem(nullptr, ImGuiMouseButton_Right)) { const static std::vector image_mime_types { + // add apng? "image/png", "image/webp", "image/gif",