So it turns out that my problem could be isolated by calling 
FormatCustom. When I put it in its own class and copied "FormatParse" 
into the same file, I got a SIGBUS when I said,

FormatCustom("000", 22, NumberFormatInfo.GetInstance(null));

So, I went to look at what was going on and I found out that this 
function caused the SIGBUS:

public static string FormatCustom (string format, int number, 
NumberFormatInfo nfi)
{
        string strnum = FormatGeneral (number, -1, nfi, true);
        FormatParse fp = new FormatParse (format); // FIXME: use nfi!
        int sign = (number < 0) ? -1 : (number > 0) ? 1 : 0;
        return fp.FormatNumber (strnum, sign);
}

and this function (with reordered first and second lines) did not:

public static string FormatCustom (string format, int number, 
NumberFormatInfo nfi)
{
        FormatParse fp = new FormatParse (format); // FIXME: use nfi!
        string strnum = FormatGeneral (number, -1, nfi, true);
        int sign = (number < 0) ? -1 : (number > 0) ? 1 : 0;
        return fp.FormatNumber (strnum, sign);
}

So I'm very much confused.


_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to