(CC) IMPORTANT note on use of FindOrAddWaypoint() and code simply reformatted with notes.
Safe NULL pointers after memcpy in FindOrAddWaypoints, and returns -1 not false in case of error.
Fix do not save to task Comments and Details from CTaskFileHelper, and check for FindOrAddWaypoint can return -1.
Do not load to task an invalid waypoint index.
Apply fix to CTaskFileHelper LPTSR and free(szContent)
Forgotten free in previous fix
Fix LoadCupTask not managing invalid return value from FindOrAddWaypoint
Apply fix to LoadCupTask memset missing and clear mapWaypoint.
Notice that Comment and Details should always be NULL!!
If they are not null, then we most likely have an invalid pointer.
Fix wrong NULL assignement in LoadTaskWaypoints
Fix LoadGpsTask using TASK_COMMENTS
Set to NULL Comment and Details in old "LoadNewTask", so we remove the problem at the origin
Refix the FindOrAddWaypoint because now we set to NULL old task file's comments and details at the origin.
Fix CTaskFileHelper with TASK_COMMENTS
Refix the comments in LoadTaskWaypoint
Enable Comments in LKT task file.  Optional TASK_DETAILS
Fix all waypoints comment must be LK_tcsncpy with size max COMMENT_SIZE.
All virtuals sized COMMENT_SIZE and not 100, to be sure.
Fix invalid LK_tcsncpy size in previous commit causing crash
Forgotten fix for pre/previous fix
This is version 4.1w
Reset correctly LDInit buffer  only once  while waiting for valid data
advance to next beta