Fixes #328. Crafty little bug -- if asm was "" vs nil, the stage would try to compile as metasm instead of using the raw payload.

git-svn-id: file:///home/svn/framework3/trunk@7278 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-10-26 17:44:43 +00:00
parent e7638ef887
commit 32f7d742b3
1 changed files with 4 additions and 2 deletions

View File

@ -487,10 +487,12 @@ protected
# is used to localize the way the generated payload is cached (whether the
# blob is part of a single, stager, or stage, for example).
#
def build(p, asm, off, suffix = '')
def build(x, asm, off, suffix = '')
# If there is no assembly to be compiled, then we return a duplicated
# copy of the raw payload blob
return p.dup if asm.nil?
if(asm.nil? or asm.empty?)
return x.dup
end
cache_key = refname + suffix
cache_entry = framework.payloads.check_blob_cache(cache_key)