diff options
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r-- | src/post-refinement.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index e0436d8a..45966eb8 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -291,7 +291,11 @@ static void apply_shift(Crystal *cr, int k, double shift) } else { t = crystal_get_osf(cr); t += shift; - crystal_set_osf(cr, t); + if ( t < 0.0 ) { + ERROR("Refusing to make OSF negative.\n"); + } else { + crystal_set_osf(cr, t); + } } break; |