summaryrefslogtreecommitdiff
path: root/plugins/liquids.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-15 01:30:15 +0200
committerPetr Mrázek2011-08-15 01:30:15 +0200
commit292074116eb949a8902b5d295a58e49c04291c9c (patch)
tree8be95fd7fc292d4ce9a7e25c6768106e5a25896b /plugins/liquids.cpp
parenta0f99ef7079bb741dcfa44b7365e3b13f3ec9016 (diff)
downloaddfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.gz
dfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.bz2
dfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.xz
Fix crash bugs in liquids and tiletypes.
Diffstat (limited to 'plugins/liquids.cpp')
-rw-r--r--plugins/liquids.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/liquids.cpp b/plugins/liquids.cpp
index 56e1b69a..0400d2d0 100644
--- a/plugins/liquids.cpp
+++ b/plugins/liquids.cpp
@@ -192,7 +192,6 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
int width = 1, height = 1, z_levels = 1;
while(!end)
{
- c->Resume();
string command = "";
std::stringstream str;
str <<"[" << mode << ":" << brushname << ":" << amount << ":" << flowmode << ":" << setmode << "]#";
@@ -271,14 +270,14 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
width = command == "" ? width : atoi (command.c_str());
if(width < 1) width = 1;
- str.clear();
+ str.str("");
str << " :set range height<" << height << "># ";
c->con.lineedit(str.str(),command,range_hist);
range_hist.add(command);
height = command == "" ? height : atoi (command.c_str());
if(height < 1) height = 1;
- str.clear();
+ str.str("");
str << " :set range z-levels<" << z_levels << "># ";
c->con.lineedit(str.str(),command,range_hist);
range_hist.add(command);