diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/cio.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/message.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/stuff.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 5 |
6 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index aa3d87f99e..f340b0c206 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1356,6 +1356,7 @@ void process_command( command_type cmd ) break; case CMD_LOOK_AROUND: + { mpr("Move the cursor around to observe a square " "(v - describe square, ? - help)", MSGCH_PROMPT); @@ -1365,6 +1366,7 @@ void process_command( command_type cmd ) if (lmove.isValid && lmove.isTarget && !lmove.isCancel) start_travel( lmove.tx, lmove.ty ); break; + } case CMD_CAST_SPELL: if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT) diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc index 91f1ddd295..df1b10a4de 100644 --- a/crawl-ref/source/cio.cc +++ b/crawl-ref/source/cio.cc @@ -364,6 +364,7 @@ void line_reader::backspace() { if (pos) { + buffer[length] = 0; --cur; char *c = cur; while (*c) diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 48a84d885b..c1431105f0 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -364,6 +364,7 @@ public: int fullray_idx; // for cycling: where did we come from? public: + ray_def(); int x() const { return static_cast<int>(accx); } int y() const { return static_cast<int>(accy); } coord_def pos() const { return coord_def(x(), y()); } diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index c615c6e3af..f7bc4bda04 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -51,6 +51,7 @@ namespace msg { std::ostream stream(new mpr_stream_buf(MSGCH_PLAIN)); std::vector<std::ostream*> stream_ptrs; + std::vector<mpr_stream_buf*> stream_buffers; std::ostream& streams(msg_channel_type chan) { @@ -68,6 +69,7 @@ namespace msg std::ostream* pos = new std::ostream(pmsb); (*pos) << std::nounitbuf; stream_ptrs.push_back(pos); + stream_buffers.push_back(pmsb); } stream << std::nounitbuf; } @@ -76,6 +78,10 @@ namespace msg { for (unsigned int i = 0; i < stream_ptrs.size(); ++i) delete stream_ptrs[i]; + stream_ptrs.clear(); + for (unsigned int i = 0; i < stream_buffers.size(); ++i) + delete stream_buffers[i]; + stream_buffers.clear(); } diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index b1c972b826..6d0f282909 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -423,6 +423,7 @@ void end(int exit_code, bool print_error, const char *format, ...) if (error[error.length() - 1] != '\n') error += "\n"; fprintf(stderr, "%s", error.c_str()); + error.clear(); } #if defined(WIN32CONSOLE) || defined(DOS) diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index d3ebdccfe4..28b32242ca 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1336,6 +1336,11 @@ static int find_next_intercept(double* accx, double* accy, const double slope) return rc; } +ray_def::ray_def() : accx(0.0), accy(0.0), slope(0.0), quadrant(0), + fullray_idx(0) +{ +} + double ray_def::reflect(double p, double c) const { return (c + c - p); |