Register | Login
Forum Index > Bugs and Fixes > Possible problem with strLen
Author Message
Pages: 1
Molotov
Member
(send private message)

Posts: 49
Topics: 21

Location:
Behind Keyboard
[927] Possible problem with strLen - posted: 2011-11-30 20:14:48
Application crashes "just disappeares" when running this code, used wait_key(nil) to see where it crashes, and when i put it after strLen() it never gets triggered smile


Code:
  uses edi esi ecx ebx;
  char curVar[90], server_name[30], server_ip[20], server_port[20], server_type[20], server_password[30];
  char* servers;
  servers = new 2048;
  
  pointer zFile;
  zFile = fileopen(serverfile,OPEN_EXISTING);
  if(zFile == null) {
    print('Couldn´t open file \r\n');

    return false;
  } else {
    print('file_open\r\n');

  }
  fileread(zFile,servers,2048,null);
  
  fileclose(zFile);
  
  
  esi = servers;
  ecx = strLen(esi);
  wait_key(nil);


"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[928] - posted: 2011-11-30 20:54:22
Seems there is a small problem with my fixup code, i will fix it now, as a quick fix so u can continue working just add this line below your uses clause:

Code:
char fix[128];


like so:

Code:
uses edi esi ecx ebx;
  char fix[128];
  char curVar[90], server_name[30], server_ip[20], server_port[20], server_type[20], server_password[30];
  char* servers;
  servers = new 2048;


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Molotov
Member
(send private message)

Posts: 49
Topics: 21

Location:
Behind Keyboard
[929] - posted: 2011-11-30 20:56:04
Ah ok.. thanks smile

this means i can continue working on the application tommorrow smile

"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[930] - posted: 2011-11-30 21:26:53
just to note that i have fixed this for next beta release

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 7 user(s) online. 0 member(s) and 7 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd