aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/buflib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/vasp/source/buflib.cpp')
-rw-r--r--externals/grill/vasp/source/buflib.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp
index 938a1969..b1a9054e 100644
--- a/externals/grill/vasp/source/buflib.cpp
+++ b/externals/grill/vasp/source/buflib.cpp
@@ -157,8 +157,8 @@ static V LibThr(flext::thr_params *)
{
flext::RelPriority(-2);
- while(libthrexit) {
- libthrcond->TimedWait(0.5f);
+ while(!libthrexit) {
+ libthrcond->TimedWait(1); // don't go below 1 here as TimedWait might not support fractions of seconds!!!
// TODO - should process return value of TimedWait
Collect();
}
@@ -286,7 +286,12 @@ ImmBuf::ImmBuf(I len):
ImmBuf::ImmBuf(BufEntry *e,I len,I offs):
VBuffer(0,len,offs),
entry(e)
-{}
+{
+ if(Length() > e->alloc) {
+ Length(e->alloc);
+ post("vasp - buffer %s: Length (%i) is out of range, corrected to %i",GetString(e->sym),len,e->alloc);
+ }
+}
VSymbol ImmBuf::Symbol() const { return entry->sym; }