Ignore:
Timestamp:
Dec 28, 2008, 5:44:40 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

マルチバイト文字列の先行バイトの扱いを忘れていたことを修正
(#235)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/IO/StreamReader.ab

    r665 r666  
    6060        Dim wcBuf[4095] As WCHAR
    6161        Dim mbBuf[4095] As SByte
    62         Dim mbLen = s.Read(mbBuf As *Byte, 0, Len(buf))
     62        Dim pNext = mbBuf As PSTR
     63        Dim mbBufSize = Len(buf)
     64        If leadByte <> 0 Then
     65            pNext[0] = leadByte
     66            leadByte = 0
     67            pNext++
     68            mbBufSize--
     69        End If
     70        Dim mbLen = s.Read(pNext As *Byte, 0, mbBufSize)
    6371        If mbLen = 0 Then
    6472            Underflow = False
    6573            Exit Function
    6674        End If
    67         Dim pNext = mbBuf As PSTR
    6875        Do
    6976            Dim q = CharNextExA(cp, pNext, 0)
Note: See TracChangeset for help on using the changeset viewer.