Development > Coding

C: appending arrays

<< < (3/3)

oxyXen:

--- Quote ---Then it should return "oxygen" and "xenophysics" instead (always the one that is nearer to "initial" and has not yet been researched)
--- End quote ---


Rightey, then i got it :)

I'll take now a break and have later a more detailed look into the research code.
Until then, i'm looking forward to the next snapshot :)

ox

Hoehrer:
Ok, just FYI: the R_GetFirstRequired fucntion now works and returns with the correct first requirements.

I think i need to add a check if it has been researched alread, but otherwise it is functional.

BUT ... there is always a "but" ;) ... i get the following error message when running "technologylist" in the console:

--- Code: ---glibc detected *** free(): invalid next size (fast): 0x18de7158 ***
Received signal 6, exiting..
--- End code ---


gdb gives me this:

--- Code: ---removed to make a readable thread

--- End code ---


I can't really decrypt this stuff. Does anybody have an idea?

Werner

Mattn:
have a look at my latest commit - i've added a fixme that descibes the error (at least i hope so)

Hoehrer:
Ah, thanks. I've suspected that the fault came from some init-problems and i even tried to init this one. But when i try to set it to 0s but that just produces  the error below.

--- Code: ---memset( req_temp, 0, sizeof( research_requirements_t ) );
--- End code ---


--- Code: ---Received signal 11, exiting...
Speicherzugriffsfehler
--- End code ---


Werner

Navigation

[0] Message Index

[*] Previous page

Go to full version