Re: Errors/Warnings missing line numbers
"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry for the delay, I've just moved and finally have fast reliable Internet access again. > First, not to sound like a broken record, I still don't see the line > number appearing on the error. I tried doing this on/around line 238: > > if (err[strlen(err)] == '\n') > err[strlen(err)] = 'X'; You need to be looking at strlen(err)-1, as C arrays start counting at 0, so "abc\n" has a length of 4, but the newline character is at position 3. Try changing your code above to subtract one like this: if (err[strlen(err)-1] == '\n') err[strlen(err)-1] = 'X'; - -- Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected] PGP Key: 0x14964AC8 200606241216 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFEnWWLvJuQZxSWSsgRApThAKDu44V5wLtZ/dAI44Fr7XU/v5u4FQCgmks3 vqENHthGfkEOAczwbdl7c/M= =ROK9 -----END PGP SIGNATURE-----