Skip to content

Fix initialization of dynamic char[]#176

Merged
dvander merged 1 commit intoalliedmodders:masterfrom
peace-maker:dynstring_init
Feb 6, 2018
Merged

Fix initialization of dynamic char[]#176
dvander merged 1 commit intoalliedmodders:masterfrom
peace-maker:dynstring_init

Conversation

@peace-maker
Copy link
Member

Initializing a string on the heap using

char[] str = "this is a value";
// NOT |char str[] = "this is a value";| which is on the stack

wasn't copying the correct string.

Add a test to catch this from now on.

Fixes alliedmodders/sourcemod#760

Initializing a string on the heap using
```
char[] str = "this is a value";
// NOT |char str[] = "this is a value";| which is on the stack
```
wasn't copying the correct string.

Add a test to catch this from now on.
@dvander
Copy link
Member

dvander commented Feb 6, 2018

Nice catch!

@dvander dvander merged commit 44c97f6 into alliedmodders:master Feb 6, 2018
@peace-maker peace-maker deleted the dynstring_init branch February 6, 2018 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants