Skip to content

Commit 7049189

Browse files
author
Arseny Kositsyn
committed
[PGPRO-12159] A typo has been fixed.
Tags: rum
1 parent d2b3a4e commit 7049189

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rum_debug_funcs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

532532
static Datum
533533
get_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

Comments
 (0)