Hi,
I have found the exact cause (of my parsing bug), and I have done a minimal project.
As OllyDbg said in his last post, this is a problem with namespace scope resolution.
See the Workspace attached.
Inside, you have 2 projects: a lib and an executable (no need to compile anything).
The lib is encapsulated in a namespace LIB_NS
In the executable, you have: main.h and main.cpp
In main.h, you have only 2 lines:
#include "lib.h"
using namespace LIB_NS; //this line can cause trouble
when the "using namespace" clause is defined in the header file, the bug occurs.
The bug does NOT occur when:
1 - the using namespace clause is the cpp file
2 - an explicit scope resolution is done in the source (ex: LIB_NS:: )
I hope this helps.
Best regards,
Sebastien
[attachment deleted by admin]