fix buggy limiter handling in shgetc