PR25198, use of out of date pointer

PR 25198
	* prdbg.c (tg_start_class_type): Correct scope of idbuf.
This commit is contained in:
Alan Modra 2019-11-18 09:16:19 +10:30
parent 4774aabeab
commit 1f67cf9845
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2019-11-18 Alan Modra <amodra@gmail.com>
PR 25198
* prdbg.c (tg_start_class_type): Correct scope of idbuf.
2019-11-08 Alan Modra <amodra@gmail.com>
PR 25172

View File

@ -2117,6 +2117,7 @@ tg_start_class_type (void *p, const char *tag, unsigned int id,
struct pr_handle *info = (struct pr_handle *) p;
char *tv = NULL;
const char *name;
char idbuf[20];
info->indent += 2;
@ -2131,8 +2132,6 @@ tg_start_class_type (void *p, const char *tag, unsigned int id,
name = tag;
else
{
char idbuf[20];
sprintf (idbuf, "%%anon%u", id);
name = idbuf;
}