Simplified the check even more, also stopping max padding from being exceeded incorrectly
Coding standard fixes