diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-03-18 11:43:09 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-03-18 11:43:09 +0000 |
commit | cf10427caa55be47a6c93976883b595cf2c5be52 (patch) | |
tree | 58b1629446d31eda3892625e90cb43a188c199d7 /src | |
parent | c13924e32cf58e51aa6b86f785c7961daf3da01e (diff) | |
download | openocd_libswd-cf10427caa55be47a6c93976883b595cf2c5be52.tar.gz openocd_libswd-cf10427caa55be47a6c93976883b595cf2c5be52.tar.bz2 openocd_libswd-cf10427caa55be47a6c93976883b595cf2c5be52.tar.xz openocd_libswd-cf10427caa55be47a6c93976883b595cf2c5be52.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/target/trace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/target/trace.c b/src/target/trace.c index 257e8ceb..93925cd1 100644 --- a/src/target/trace.c +++ b/src/target/trace.c @@ -128,7 +128,11 @@ int handle_trace_history_command(struct command_context_s *cmd_ctx, char *cmd, c int i; int first = 0; 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) { first = trace->trace_history_pos; |