View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001815 | Far Manager | Plugins API | public | 2011-06-27 22:30 | 2011-06-28 08:24 |
| Reporter | Maximus | Assigned To | DrKnS | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.0 | ||||
| Fixed in Version | 3.0 | ||||
| Summary | 0001815: Ошибка в ACTL_GETARRAYCOLOR | ||||
| Description | Возвращается только часть массива. Возможно, стоит еще требовать передачи в Param1 размера буфера. Правда несколько спорный вопрос, в чем лучше считать эти размеры. И чуть поправлен комментарий для ACTL_GETCOLOR | ||||
| Tags | No tags attached. | ||||
| Build | 2081 | ||||
|
|
GetArrayColor.diff (957 bytes)
Index: plugapi.cpp
===================================================================
--- plugapi.cpp (revision 6357)
+++ plugapi.cpp (working copy)
@@ -293,10 +293,11 @@
return WaitKey(Param1?Param1:-1,0,false);
}
/* $ 04.12.2000 SVS
- ACTL_GETCOLOR - ������ ����������� ���� �� ������, �������������
+ ACTL_GETCOLOR - ������ ����������� ���� �� �������, �������������
� farcolor.hpp
Param1 - ������.
- Return - ������� ����� ��� -1 ���� ������ �������.
+ Param2 - [OUT] ������� �����
+ Return - TRUE ���� OK ��� FALSE ���� ������ �������.
*/
case ACTL_GETCOLOR:
{
@@ -315,7 +316,7 @@
case ACTL_GETARRAYCOLOR:
{
if (Param2)
- memcpy(Param2,Opt.Palette.CurrentPalette, Opt.Palette.SizeArrayPalette);
+ memcpy(Param2, Opt.Palette.CurrentPalette, Opt.Palette.SizeArrayPalette*sizeof(*Opt.Palette.CurrentPalette));
return Opt.Palette.SizeArrayPalette;
}
|
|
|
2081. Param1 - размер буфера в FarColor'ах. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-06-27 22:30 | Maximus | New Issue | |
| 2011-06-27 22:30 | Maximus | File Added: GetArrayColor.diff | |
| 2011-06-28 08:24 | DrKnS | Build | => 2081 |
| 2011-06-28 08:24 | DrKnS | Note Added: 0007218 | |
| 2011-06-28 08:24 | DrKnS | Status | new => closed |
| 2011-06-28 08:24 | DrKnS | Assigned To | => DrKnS |
| 2011-06-28 08:24 | DrKnS | Resolution | open => fixed |
| 2011-06-28 08:24 | DrKnS | Fixed in Version | => 3.0 |