Skip to content

Commit

Permalink
Try allocating memory to fontcap.path
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho committed Apr 23, 2024
1 parent b8a0718 commit 4dbb27e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions general/g.mkfontcap/stroke_fonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ void find_stroke_fonts(void)
fprintf(stderr, "G.MKFONTCAP %d %p %p %p; %s %c %s\n", __LINE__,
&fontcap[totalfonts].path, &(fontcap[totalfonts].path),
fontcap[totalfonts].path, dirpath, HOST_DIRSEP, dirlisting[i]);
fontcap[totalfonts].path = G_malloc(10);
fprintf(stderr, "G.MKFONTCAP %d %p %p\n", &fontcap[totalfonts].path,
fontcap[totalfonts].path);
sprintf(fontcap[totalfonts].path, "hello");
fprintf(stderr, "G.MKFONTCAP %d %p %p %s\n", &fontcap[totalfonts].path,
fontcap[totalfonts].path, fontcap[totalfonts].path);
G_asprintf(&fontcap[totalfonts].path, "%s%c%s", dirpath, HOST_DIRSEP,
dirlisting[i]);
fprintf(stderr, "G.MKFONTCAP %d %p %p; %s\n", __LINE__,
Expand Down

0 comments on commit 4dbb27e

Please sign in to comment.