Skip to content

Commit

Permalink
debugger: variable scope reduction in debug_paste.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Fosdick committed Dec 20, 2023
1 parent 69f2d23 commit ab4c0d7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,11 @@ static void list_points(cpu_debug_t *cpu, break_type type, const char *desc)

void debug_paste(const char *iptr)
{
int ch;
char *str, *dptr;

if ((ch = *iptr++)) {
if ((str = al_malloc(strlen(iptr) + 1))) {
dptr = str;
int ch = *iptr++;
if (ch) {
char *str = al_malloc(strlen(iptr) + 1);
if (str) {
char *dptr = str;
do {
if (ch == '|') {
if (!(ch = *iptr++))
Expand Down

0 comments on commit ab4c0d7

Please sign in to comment.