View Single Post
Backup
Senior Member
Join Date: Jul 2010
Location: Česká Republika
Old 02-25-2018 , 09:31   Re: [EXTENSION] Late Downloads
Reply With Quote #14

Quote:
Originally Posted by GHartmann View Post
I've discovered some sort of memory(?) bug, but I'm not proficient enough with C++ to figure out the cause.

Apologies in advance if there's actually just something wrong on my end I'm not seeing.

...
Thanks for the error reports! All problems were on my side, except for the testdl4.
testdl & testdl2b problems were indeed caused by bad memory handling, storing pointers to plugin's stack. I've fixed these in the new release, you can try it out.
testdl4 is a bug in sourcepawn itself, you can try it out just by replacing AddLateDownload by PrintToServer. It is some kind of compiler issue, probably solved by now:
https://github.com/alliedmodders/sou...014969e47f9396
You can work around this issue by moving the brackets behind the variable name. If you look at the attached image, you can clearly see the problem.

Quote:
Originally Posted by Leonardo View Post
Compiled with MSVC v14.0 against sdk2013 on windows x64, AddLateDownloads with addAsStatic=true always returns 0. This happens when filled addedFiles is passed to SendFiles function via pointer.
Before sending to SendFiles, FOR_EACH_VEC says it's filled, but within SendFiles FOR_EACH_VEC says it's empty.
Oops, fixed, try it now please.
Attached Thumbnails
Click image for larger version

Name:	compiler-bug.PNG
Views:	311
Size:	55.2 KB
ID:	168666  
__________________
Sorry for my english.
Backup is offline