[client] core: use portable alloc_sprintf instead of asprintf
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
build / client-tests (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client-tests (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled

This commit is contained in:
Geoffrey McRae
2026-07-31 14:01:08 +10:00
parent 07133e0a69
commit 08993d3e1e

View File

@@ -29,6 +29,7 @@
#include "common/debug.h" #include "common/debug.h"
#include "common/array.h" #include "common/array.h"
#include "common/proctitle.h" #include "common/proctitle.h"
#include "common/stringutils.h"
#include "common/version.h" #include "common/version.h"
#include <math.h> #include <math.h>
@@ -765,8 +766,8 @@ void core_setTitle(const char * title)
return; return;
char * string; char * string;
if (asprintf(&string, "Looking Glass Client %s%s%s", BUILD_VERSION, if (alloc_sprintf(&string, "Looking Glass Client %s%s%s", BUILD_VERSION,
title && *title ? ": " : "", title ? title : "") >= 0) title && *title ? ": " : "", title ? title : "") >= 0)
{ {
lgSetProcessTitle(string); lgSetProcessTitle(string);
free(string); free(string);