aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorEdmondo Tommasina <[email protected]>2017-01-01 22:31:57 +0100
committerMarek Olšák <[email protected]>2017-01-03 22:08:41 +0100
commitabcaba497d8c90a1e9dcede71261bdee16e2ed4e (patch)
treee07aec869a5165d6caa060cf26a5ca8956e62131 /src/gallium/auxiliary
parente933246013eef376804662f3fcf4646c143c6c88 (diff)
gallium/hud: add a path separator between dump directory and filename
It's more user friendly and it avoids to write files in unexpected places. Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index f2f503dab8f..44f14762a63 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -873,9 +873,10 @@ hud_graph_set_dump_file(struct hud_graph *gr)
char *dump_file;
if (hud_dump_dir && access(hud_dump_dir, W_OK) == 0) {
- dump_file = malloc(strlen(hud_dump_dir) + sizeof(gr->name));
+ dump_file = malloc(strlen(hud_dump_dir) + sizeof("/") + sizeof(gr->name));
if (dump_file) {
strcpy(dump_file, hud_dump_dir);
+ strcat(dump_file, "/");
strcat(dump_file, gr->name);
gr->fd = fopen(dump_file, "w+");
free(dump_file);