bglibs-1.022/str/alloc.c comment

Uffe Jakobsen <[email protected]>
Newsgroups gmane.comp.sysutils.bgware
Message-ID <[email protected]>
Hi Bruce,

bglibs-1.022/str/alloc.c (line 32-36) states:
---
32: int str_alloc(str* s, unsigned size, int copy)
33: {
34:   char* news;
35:   unsigned newsize;
36:  if ((newsize = size + 1) < size) return 0;
---

I wonder if line 36 should have been this instead or ???

36:  if ((newsize = size + 1) < s->size) return 0;


Anyway with the above construct it doesn't seem possible to resize a string to something less than the actual size. It that correct ?


Kind regards Uffe Jakobsen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.