Autor Thema: BUFFER_SEARCH must return -1 when STR is not found  (Gelesen 4807 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Pessimister

  • Gast
BUFFER_SEARCH must return -1 when STR is not found
« am: 29. August 2010, 21:39:08 »
Hello all!

I wondered that BUFFER_SEARCH function returns 0 in both cases:

V := _STRING_TO_BUFFER('Same string', 0, ADR(BUF), SIZEOF(BUF));
POS := BUFFER_SEARCH(ADR(BUF), SIZEOF(BUF), 'Same string', 0, 0);

Function results 0.

V := _STRING_TO_BUFFER('Other string', 0, ADR(BUF), SIZEOF(BUF));
POS := BUFFER_SEARCH(ADR(BUF), SIZEOF(BUF), 'Same string', 0, 0);

Function results 0 too.

Offline hugo

  • Global Moderator
  • *****
  • Beiträge: 2 150
    • Profil anzeigen
Re:BUFFER_SEARCH must return -1 when STR is not found
« Antwort #1 am: 19. Januar 2011, 13:52:14 »
buffer search will be updated in the next release and will correctly return -1 if nothing is found