Hiroshi Ito <ito@mlb.co.jp> fix division by 0
git-svn-id: svn://svn.berlios.de/openocd/trunk@1416 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
c13924e32c
commit
cf10427caa
|
@ -129,6 +129,10 @@ int handle_trace_history_command(struct command_context_s *cmd_ctx, char *cmd, c
|
||||||
int first = 0;
|
int first = 0;
|
||||||
int last = trace->trace_history_pos;
|
int last = trace->trace_history_pos;
|
||||||
|
|
||||||
|
if ( !trace->trace_history_size ) {
|
||||||
|
command_print(cmd_ctx, "trace history buffer is not allocated");
|
||||||
|
return ERROR_OK;
|
||||||
|
}
|
||||||
if (trace->trace_history_overflowed)
|
if (trace->trace_history_overflowed)
|
||||||
{
|
{
|
||||||
first = trace->trace_history_pos;
|
first = trace->trace_history_pos;
|
||||||
|
|
Loading…
Reference in New Issue