mirror of
git://git.psyced.org/git/psyclpc
synced 2024-08-15 03:20:16 +00:00
applied patch from zesstra which fixed ldmud bug #498
This commit is contained in:
parent
2ede0de60e
commit
1d490d6a92
1 changed files with 5 additions and 4 deletions
|
@ -137,6 +137,7 @@ f_idna_stringprep (svalue_t *sp)
|
||||||
/* Get and check the flags. */
|
/* Get and check the flags. */
|
||||||
{
|
{
|
||||||
p_uint argflags = (p_uint)sp->u.number;
|
p_uint argflags = (p_uint)sp->u.number;
|
||||||
|
sp--;
|
||||||
|
|
||||||
if (argflags > (STRINGPREP_FLAG_MAX << 1)-1
|
if (argflags > (STRINGPREP_FLAG_MAX << 1)-1
|
||||||
|| argflags & (STRINGPREP_NO_NFKC_FLAG | STRINGPREP_NO_BIDI_FLAG)
|
|| argflags & (STRINGPREP_NO_NFKC_FLAG | STRINGPREP_NO_BIDI_FLAG)
|
||||||
|
@ -151,12 +152,11 @@ f_idna_stringprep (svalue_t *sp)
|
||||||
if (argflags & STRINGPREP_NO_NFKC_FLAG) flags |= STRINGPREP_NO_NFKC;
|
if (argflags & STRINGPREP_NO_NFKC_FLAG) flags |= STRINGPREP_NO_NFKC;
|
||||||
if (argflags & STRINGPREP_NO_BIDI_FLAG) flags |= STRINGPREP_NO_BIDI;
|
if (argflags & STRINGPREP_NO_BIDI_FLAG) flags |= STRINGPREP_NO_BIDI;
|
||||||
if (argflags & STRINGPREP_NO_UNASSIGNED_FLAG) flags |= STRINGPREP_NO_UNASSIGNED;
|
if (argflags & STRINGPREP_NO_UNASSIGNED_FLAG) flags |= STRINGPREP_NO_UNASSIGNED;
|
||||||
free_svalue(sp--);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get and check the profile */
|
/* Get and check the profile */
|
||||||
prof = (int)sp->u.number;
|
prof = (int)sp->u.number;
|
||||||
free_svalue(sp--);
|
sp--;
|
||||||
|
|
||||||
/* select the profile */
|
/* select the profile */
|
||||||
switch(prof)
|
switch(prof)
|
||||||
|
@ -214,12 +214,13 @@ f_idna_stringprep (svalue_t *sp)
|
||||||
|
|
||||||
if (ret != STRINGPREP_OK)
|
if (ret != STRINGPREP_OK)
|
||||||
{
|
{
|
||||||
put_number(sp, -ret);
|
|
||||||
errorf("stringprep(): Error %s", stringprep_strerror(ret));
|
errorf("stringprep(): Error %s", stringprep_strerror(ret));
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// free the string argument
|
||||||
|
free_svalue(sp);
|
||||||
put_c_string(sp, buf);
|
put_c_string(sp, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue