It is currently Fri Sep 10, 2010 2:32 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: hack >64k strings is fixed...
PostPosted: Thu Dec 02, 2004 6:06 pm 
Offline
User
User
User avatar

Joined: Sun Oct 19, 2003 11:21 am
Posts: 13
Location: www
See this topic: http://forums.purebasic.com/english/viewtopic.php?t=9194

After update http://www.purebasic.com/update/ from November 30th, the 64k limit is gone!

ReplaceString, RemoveString is working.

Code:
Procedure SetStringManipulationBufferSize(Bytes)
  PBStringBase.l = 0
  PBMemoryBase.l = 0
  !MOV eax, dword [PB_StringBase]
  !MOV [esp+4],eax
  !MOV eax, dword [PB_MemoryBase]
  !MOV [esp+8],eax
  HeapReAlloc_(PBMemoryBase, #GMEM_ZEROINIT, PBStringBase, Bytes)
  !MOV dword [_PB_StringBase],eax
EndProcedure

; Set the buffer size for all strings to 1 MB.
SetStringManipulationBufferSize(1048576)
A$ = Space(1000000)+"test"

; NO MORE CRASH 1 - ReplaceString()
A$ = ReplaceString(A$,"test","pure")
Debug right(a$,4)

; NO MORE CRASH 2 - RemoveString()
A$ = RemoveString(A$,"pu")
Debug Right(A$,2)

Debug Len (A$)

_________________
pIII@1Ghz, wXP, 512MB, pb3.93full


Top
 Profile  
 
 Post subject: Re: hack >64k strings is fixed...
PostPosted: Thu Dec 02, 2004 7:45 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 5:24 pm
Posts: 6395
Good news! Thanks for letting us know. :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 9:28 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 3777
Location: Strasbourg / France
Very good news, thanks :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Ask Jeeves [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye