Return script buffer without copying.

* Since IDE interrupts are enabled after compiling the script, we can
just return a pointer to the script buffer without copying it first.
This commit is contained in:
iabdalkader 2015-08-17 19:48:45 +02:00
parent b33f7b4c29
commit d7130234d3

View File

@ -48,10 +48,7 @@ int usbdbg_script_ready()
vstr_t *usbdbg_get_script()
{
vstr_t *scr = vstr_new();
vstr_add_strn(scr, vstr_str(&script_buf), vstr_len(&script_buf));
vstr_reset(&script_buf);
return scr;
return &script_buf;
}
void usbdbg_clear_flags()