
25 Oct
2007
25 Oct
'07
3:58 p.m.
Sean Huang escribió:
if(total_size > (__int64)((std::size_t)(-1))){ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error_info err(size_error); throw interprocess_exception(err); } size = static_cast<std::size_t>(total_size - offset); }
Sometimes I must admit my code is *really* bad. The ugly castswill make that fail for 64 bit machines (where sizeof(std::size_t) == sizeof(__int64). I've committed a fix:: if(total_size > std::numeric_limits<std::size_t>::max()){ Let's see if things go better. Anyway, I'll continue to chatch the access violation. Regards, Ion