Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Nov 19, 2023
1 parent c9a4a13 commit 6b7d2ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib_jtag_core/src/script/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ char * getEnvVarDatIndex( envvar_entry * env, int index, char * vardata, int max
stringcopy(vardata,(char*)&env->buf[off + 2 + varname_size + 2], maxsize);
}

return (char*)&env->buf[off + 2 + varname_size + 2];
return (char*)&env->buf[off + 2];
}
}

Expand Down Expand Up @@ -515,6 +515,8 @@ envvar_entry * initEnv(envvar_entry * env, envvar_entry * dst)
return NULL;
}

tmp_envvars->bufsize = env->bufsize;

memcpy(tmp_envvars->buf,env->buf,env->bufsize);

return tmp_envvars;
Expand Down

0 comments on commit 6b7d2ce

Please sign in to comment.