fixes for 64bit archs: don't assume a pointer is 32bit wide

This commit is contained in:
Stefan Seyfried
2012-10-06 17:49:16 +02:00
parent 4009fea6d8
commit d806eeb544
15 changed files with 39 additions and 33 deletions

View File

@@ -682,7 +682,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info)
pos2 = -1;
ptr = strstr(&text[pos], MI_XML_TAG_PID);
if (ptr)
pos2 = (int)ptr - (int)&text[pos];
pos2 = (int)(ptr - &text[pos]);
//pos2 = strcspn(&text[pos],MI_XML_TAG_PID);
if (pos2 >= 0) {
pos2 += sizeof(MI_XML_TAG_PID);
@@ -697,7 +697,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info)
pos2 = -1;
ptr = strstr(&text[pos], MI_XML_TAG_ATYPE);
if (ptr)
pos2 = (int)ptr - (int)&text[pos];
pos2 = (int)(ptr - &text[pos]);
//pos2 = strcspn(&text[pos],MI_XML_TAG_ATYPE);
if (pos2 >= 0) {
pos2 += sizeof(MI_XML_TAG_ATYPE);
@@ -711,7 +711,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info)
pos2 = -1;
ptr = strstr(&text[pos], MI_XML_TAG_SELECTED);
if (ptr)
pos2 = (int)ptr - (int)&text[pos];
pos2 = (int)(ptr - &text[pos]);
//pos2 = strcspn(&text[pos],MI_XML_TAG_SELECTED);
if (pos2 >= 0) {
pos2 += sizeof(MI_XML_TAG_SELECTED);
@@ -726,7 +726,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info)
pos2 = -1;
ptr = strstr(&text[pos], MI_XML_TAG_NAME);
if (ptr)
pos2 = (int)ptr - (int)&text[pos];
pos2 = (int)(ptr - &text[pos]);
if (pos2 >= 0) {
pos2 += sizeof(MI_XML_TAG_PID);
while (text[pos + pos2] != '\"' && text[pos + pos2] != 0 && text[pos + pos2] != '/')