差分発生行の前後
無視リスト:
コミット日時:
2009/11/23 16:31:29 (3 年前)
コミッタ:
yossy
ログメッセージ:

ForcibleLoader?: Fixed behavior of flagSWF9Bit method if SWF has no FileAttribute? tag.

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/ForcibleLoader/src/org/libspark/utils/ForcibleLoader.as

    r2691 r3232  
    1 /* 
     1/* 
    22 * ForcibleLoader 
    33 *  
     
    144144                } 
    145145                 
    146                 private function findFileAttributesPosition(offset:uint, bytes:ByteArray):uint 
     146                private function findFileAttributesPosition(offset:uint, bytes:ByteArray):int 
    147147                { 
    148148                        bytes.position = offset; 
     
    165165                        } 
    166166                         
    167                         return NaN
     167                        return -1
    168168                } 
    169169                 
    170170                private function flagSWF9Bit(bytes:ByteArray):void 
    171171                { 
    172                         var pos:uint = findFileAttributesPosition(getBodyPosition(bytes), bytes); 
    173                         if (!isNaN(pos)) { 
     172                        var pos:int = findFileAttributesPosition(getBodyPosition(bytes), bytes); 
     173                        if (pos != -1) { 
    174174                                bytes[pos + 2] |= 0x08; 
     175                        } 
     176                        else { 
     177                                insertFileAttributesTag(bytes); 
    175178                        } 
    176179                }