Skip to content

Commit

Permalink
Fixed a couple bugs I introduced.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Aug 11, 2014
1 parent 59362b0 commit ea07b77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -2075,9 +2075,10 @@ readXml(
(void)memmove(base, dirname(base), sizeof(base));
#else
{
char *m_dir;
char *m_dir = (char*)malloc(sizeof(char)*1024);
_splitpath(base,NULL,m_dir,NULL,NULL);
(void)memmove(base,m_dir,sizeof(base));
free(m_dir);
}
#endif
base[sizeof(base)-1] = 0;
Expand Down
2 changes: 1 addition & 1 deletion prog/udunits2.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ decodeCommandLine(
{
char *m_fname = (char*)malloc(sizeof(char)*256);
char *m_ext = (char*)malloc(sizeof(char)*256);
char *tmp;
char tmp[1024];
_splitpath(argv[0],NULL,NULL,m_fname,m_ext);
sprintf(tmp,"%s.%s",m_fname,m_ext);
_progname=tmp;
Expand Down

0 comments on commit ea07b77

Please sign in to comment.