Skip to content

Instantly share code, notes, and snippets.

@adammck
Last active March 19, 2017 19:22
Show Gist options
  • Save adammck/7e4a14f7dd4cc58eea8afa99d1ad9f5d to your computer and use it in GitHub Desktop.
Save adammck/7e4a14f7dd4cc58eea8afa99d1ad9f5d to your computer and use it in GitHub Desktop.
diff --git a/src/parser.c b/src/parser.c
index afbfed5..0f459f2 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -332,7 +332,7 @@ int parse_line(struct prog_info *pi, char *line)
}
return(True);
}
- strcpy(pi->fi->scratch, &pi->fi->scratch[i]);
+ memmove(pi->fi->scratch, &pi->fi->scratch[i], strlen(&pi->fi->scratch[i])+1);
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment