Skip to content

Commit

Permalink
Fixing a format problem with strings due to a bad decision
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelPau committed Apr 17, 2024
1 parent 306655c commit aef5884
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/miramon/mm_gdal_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int MM_ModifyFieldNameAndDescriptorIfPresentBD_XP(
struct MM_FIELD *camp, struct MM_DATA_BASE_XP *bd_xp,
MM_BOOLEAN no_modifica_descriptor, size_t mida_nom);

int MMWritePreformatedValueToRecordDBXP(
int MMWritePreformatedNumberValueToRecordDBXP(
struct MiraMonVectLayerInfo *hMiraMonLayer, char *registre,
const struct MM_FIELD *camp, const char *valor);
int MMWriteValueToRecordDBXP(struct MiraMonVectLayerInfo *hMiraMonLayer,
Expand Down
22 changes: 16 additions & 6 deletions ogr/ogrsf_frmts/miramon/mm_wrlayr.c
Original file line number Diff line number Diff line change
Expand Up @@ -6652,7 +6652,7 @@ MMWriteValueToszStringToOperate(struct MiraMonVectLayerInfo *hMiraMonLayer,
return 0;
}

int MMWritePreformatedValueToRecordDBXP(
int MMWritePreformatedNumberValueToRecordDBXP(
struct MiraMonVectLayerInfo *hMiraMonLayer, char *registre,
const struct MM_FIELD *camp, const char *valor)
{
Expand Down Expand Up @@ -6735,12 +6735,22 @@ static int MMAddFeatureRecordToMMDB(struct MiraMonVectLayerInfo *hMiraMonLayer,
continue;
}
if (pBD_XP->pField[nIField + nNumPrivateMMField].FieldType == 'C' ||
pBD_XP->pField[nIField + nNumPrivateMMField].FieldType == 'D' ||
(pBD_XP->pField[nIField + nNumPrivateMMField].FieldType ==
'N' &&
!pBD_XP->pField[nIField + nNumPrivateMMField].Is64))
pBD_XP->pField[nIField + nNumPrivateMMField].FieldType == 'D')
{
if (MMWritePreformatedValueToRecordDBXP(
if (MMWriteValueToRecordDBXP(hMiraMonLayer, pszRecordOnCourse,
pBD_XP->pField + nIField +
nNumPrivateMMField,
hMMFeature->pRecords[nIRecord]
.pField[nIField]
.pDinValue,
FALSE))
return 1;
}
else if (pBD_XP->pField[nIField + nNumPrivateMMField].FieldType ==
'N' &&
!pBD_XP->pField[nIField + nNumPrivateMMField].Is64)
{
if (MMWritePreformatedNumberValueToRecordDBXP(
hMiraMonLayer, pszRecordOnCourse,
pBD_XP->pField + nIField + nNumPrivateMMField,
hMMFeature->pRecords[nIRecord]
Expand Down

0 comments on commit aef5884

Please sign in to comment.