This change just improves the wording around contribution in the readme, contributing and PR template to ensure contributors discuss proposed changes before actually writing any code to save time during code review.
For some reason `i` will be `32` after our for loop so an OOB happens when code tries to assign `'\0'` to `name[32]` since `name` size is 32.
Doing a `-1` to `i` fixed this issue and now throws `error 038: extra characters on line` when character count is over 31.
commit b32aea5faf3cf5168cf69b1143de6b49853f0879
Author: Yashas <yashas_2010@yahoo.com>
Date: Tue Oct 16 23:07:47 2018 +0530
add test for issue #371
commit 66bbe6c4df3593c28fcc229b04c2be428d1da070
Author: Yashas <yashas_2010@yahoo.com>
Date: Wed Oct 3 17:05:10 2018 +0530
share usage information across function definitions
source/compiler/sc1.c: In function ‘check_tagmismatch_multiple’:
source/compiler/sc1.c:3482:40: warning: ‘"’ directive writing 1 byte into a region of size between 0 and 4094 [-Wformat-overflow=]
sprintf(formal_tagnames,"%s\"%s\"",formal_tagnames,(tagsym!=NULL) ? tagsym->name : "-unknown-");
^~
source/compiler/sc1.c:3482:9: note: ‘sprintf’ output 3 or more bytes (assuming 4097) into a destination of size 4095
sprintf(formal_tagnames,"%s\"%s\"",formal_tagnames,(tagsym!=NULL) ? tagsym->name : "-unknown-");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makes the compiler slightly more future-proof by allowing us to do something like:
```pawn
#if __Pawn >= 0x03AB
#message You're on a nice new compiler.
#endif
```
Currently to do that you need to do:
```pawnc
#message You're on a nice new compiler.
```
```pawn
#if __Pawn >= 0x03AB
#include "message.inc"
#endif
```
Or you get an error that `#message` (or anything else) is an unknown directive if the compiler doesn't recognise it, even if it is disabled.
The only downside to this is that it makes it slightly harder to add new `#if`-like directives:
```pawn
#if __Pawn >= 0x03AB
#message You're on a nice new compiler.
#elif SHOW_ERROR
#error You've got an error.
#endif
```
A compiler that fails the first check AND doesn't recognise `#elif` will simply skip it and go all the way to `#endif`. It will not evaluate it as `#elseif` and potentially run the code within. It should somehow recognise `#elif` as a `#if`-like directive it just doesn't know and give an error. That would require some sort of hard convention we don't yet have. That, or we just define all possible ones now (even if they aren't implemented):
```pawn
#if
#else
#elseif
#elif
#ifdef
#elifdef
#elseifdef
#endif
#fi
#el
#ifndef
#elseifndef
#elifndef
```
Can't think of any more, but that doesn't mean there aren't any (does `iff` make any sense here?)