質問編集履歴
1
Fix format character
    
        title	
    CHANGED
    
    | 
         
            File without changes
         
     | 
    
        body	
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            バイナリファイルからshort型(2bytes)を読み込もうとしています。
         
     | 
| 
       3 
3 
     | 
    
         
             
            0xb0 0x6aと書き込まれていて、45162が答えの時、
         
     | 
| 
       4 
4 
     | 
    
         
             
            ```
         
     | 
| 
       5 
     | 
    
         
            -
            answer = int(struct.unpack(' 
     | 
| 
      
 5 
     | 
    
         
            +
            answer = int(struct.unpack('h',pcap.read(2))[0])
         
     | 
| 
       6 
6 
     | 
    
         
             
            ```
         
     | 
| 
       7 
7 
     | 
    
         
             
            とすると27312になり、
         
     | 
| 
       8 
8 
     | 
    
         
             
            ```
         
     |