summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/Process-linux.cpp5
-rw-r--r--plugins/tweak.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp
index 4a66470f..1fecbab7 100644
--- a/library/Process-linux.cpp
+++ b/library/Process-linux.cpp
@@ -127,6 +127,9 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
char permissions[5]; // r/-, w/-, x/-, p/s, 0
FILE *mapFile = ::fopen("/proc/self/maps", "r");
+ if (!mapFile)
+ return;
+
size_t start, end, offset, device1, device2, node;
while (fgets(buffer, 1024, mapFile))
@@ -148,6 +151,8 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
temp.valid = true;
ranges.push_back(temp);
}
+
+ fclose(mapFile);
}
uint32_t Process::getBase()
diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp
index de7695fb..bebc346c 100644
--- a/plugins/tweak.cpp
+++ b/plugins/tweak.cpp
@@ -89,10 +89,10 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
" Fixes rendering of creature weight limits in pressure plate build menu.\n"
" tweak stable-temp [disable]\n"
" Fixes performance bug 6012 by squashing jitter in temperature updates.\n"
- " tweak fast-heat [max-ticks]\n"
+ " tweak fast-heat <max-ticks>\n"
" Further improves temperature updates by ensuring that 1 degree of\n"
" item temperature is crossed in no more than specified number of frames\n"
- " when updating from the environment temperature.\n"
+ " when updating from the environment temperature. Use 0 to disable.\n"
));
return CR_OK;
}