@@ -526,8 +526,8 @@ pos_get_weight(WordEntryPos position)
526526 * which the positions of the lexemes are recorded.
527527 */
528528
529- #define POS_STR_BUF_LENGHT 1024
530- #define POS_MAX_VAL_LENGHT 6
529+ #define POS_STR_BUF_LENGTH 1024
530+ #define POS_MAX_VAL_LENGTH 16
531531
532532static Datum
533533get_positions_to_text_datum (Datum addInfo )
@@ -548,9 +548,9 @@ get_positions_to_text_datum(Datum addInfo)
548548 VARSIZE_ANY_EXHDR (positions ));
549549
550550 /* Initialize the string */
551- positionsStr = (char * ) palloc (POS_STR_BUF_LENGHT * sizeof (char ));
551+ positionsStr = (char * ) palloc (POS_STR_BUF_LENGTH * sizeof (char ));
552552 positionsStr [0 ] = '\0' ;
553- curMaxStrLenght = POS_STR_BUF_LENGHT - 1 ;
553+ curMaxStrLenght = POS_STR_BUF_LENGTH - 1 ;
554554 positionsStrCurPtr = positionsStr ;
555555
556556 /* Extract the positions of the lexemes and put them in the string */
@@ -574,9 +574,9 @@ get_positions_to_text_datum(Datum addInfo)
574574 * if necessary, overspend the memory.
575575 */
576576 if (curMaxStrLenght - (positionsStrCurPtr - positionsStr )
577- <= POS_MAX_VAL_LENGHT )
577+ <= POS_MAX_VAL_LENGTH )
578578 {
579- curMaxStrLenght += POS_STR_BUF_LENGHT ;
579+ curMaxStrLenght += POS_STR_BUF_LENGTH ;
580580 positionsStr = (char * ) repalloc (positionsStr ,
581581 curMaxStrLenght * sizeof (char ));
582582 positionsStrCurPtr = positionsStr + strlen (positionsStr );
0 commit comments