浏览代码

Fixed DataBuffer.PeekString using wrong length.

Mark Sibly 8 年之前
父节点
当前提交
39435d3ff0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/std/memory/databuffer.monkey2

+ 1 - 1
modules/std/memory/databuffer.monkey2

@@ -430,7 +430,7 @@ Class DataBuffer Extends std.resource.Resource
 	Method PokeString( offset:Int,value:String )
 		DebugAssert( offset>=0 And offset<=_length )
 		
-		Local count:=value.Length
+		Local count:=value.CStringLength
 		If offset+count>_length count=_length-offset
 		value.ToCString( _data+offset,count )
 	End