Method: Rex::PeParsey::PeBase._align_offset

Defined in:
lib/rex/peparsey/pebase.rb

._align_offset(offset, alignment) ⇒ Object

Just a stupid routine to round an offset up to it’s alignment.

For example, you’re going to want this for FileAlignment and SectionAlignment, etc…



1134
1135
1136
1137
1138
# File 'lib/rex/peparsey/pebase.rb', line 1134

def self._align_offset(offset, alignment)
  offset += alignment - 1
  offset -= offset % alignment
  return offset
end